Use `env` parameter instead of adding it to the command, and copy the
hook rather than adding a symbolic link to it to avoid losing it with
`cargo clean`.
We run clippy twice: once to generate the JSON format for the code
quality report, and the second time to get the real output which
should be faster because the build is cached.
Since we only support maps in light mode, the accent color is too light
in dark mode so the marker doesn't have enough contrast with an "earth"
background, and even less with a "water" background.
The background accent color doesn't change between light and dark mode
and has enough contrast.
Updates the icons with the latest version from Icon Library. In some
cases the SVG code was too complicated for such simple symbolics, the
new versions are simpler. A few also changed visually.
This also removes some duplicate or similar icons.
Instead of having support for a handful of SSO providers on our end,
the user is always redirected to the default SSO URL where they will be
presented with all the providers supported by the homeserver.
This matches the UX of OAuth 2.0 where we can only redirect the user to
the homeserver's UI, and allows us to remove a bunch of code and files.
A new lint in gettext disallows `ngettext` strings where a variable is
present in the singular but not the plural. So the solution is to use
`gettext` for the singular and `gettext` or `ngettext` for the plural,
depending on whether we need to use the count.
This is justified in the gettext docs that say that `ngettext`
shouldn't be used if the count isn't used in the strings.
It seems like the previous checks script didn't report the required
changes due to the conversion of UI files to Blueprint. The new script
complains about this however.
The script has become quite big so it is easier to maintain it in Rust
to add new features.
Ideally we would declare it as a single file cargo script, but that
still requires the nightly toolchain. So we make it a separate checks
crate with no dependencies, to make compilation fast.
It is a separate crate instead of a member of the workspace because
cargo insists on downloading the git dependencies of the fractal crate
before building the checks crate, which adds 20-30 seconds to the first
compilation. Sadly that means the IDEs will probably not be very helpful
when modifying it, and cargo commands run from the root of the workspace
need to point explicitly to the manifest with the `--manifest-path`
argument.
It is pre-compiled during `meson setup` and a symlink is created at
`hooks/checks-bin`, that is used by the pre-commit hook. It is a
requirement for me because I use different environments to compile
crates and to commit changes.
Incidentally, this fixes the check about sorting the POTFILEs
alphabetically.
wtinylfu's author recommends to use another crate because of its low
maintenance. Also quick_cache is more popular so problems are more
likely to be found.