Commit Graph

23 Commits

Author SHA1 Message Date
pre-commit-ci[bot] acea8040cd [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/mozilla-l10n/moz-fluent-linter: v0.4.8 → v0.4.9](https://github.com/mozilla-l10n/moz-fluent-linter/compare/v0.4.8...v0.4.9)
2026-04-06 21:56:12 +02:00
xtqqczze fca0d0416c pre-commit: update cargo-lock-check to suggest changes 2026-04-06 00:12:12 +02:00
Sylvestre Ledru cad160f9f3 Revert "pre-commit: update rust-clippy and cargo-lock-check to run without ac…" (#11621)
This reverts commit c612ad8b96.
2026-04-03 18:44:06 +02:00
xtqqczze c612ad8b96 pre-commit: update rust-clippy and cargo-lock-check to run without accessing the network 2026-04-03 08:29:10 +02:00
Sylvestre Ledru af81585b60 pre-commit: skip cargo and cspell hooks on pre-commit.ci 2026-03-31 09:18:04 +02:00
Sylvestre Ledru f123606732 pre-commit: exclude tests/fixtures from all hooks 2026-03-31 09:18:04 +02:00
Sylvestre Ledru e71e022464 pre-commit: add Cargo.lock sync check
Catch out-of-date Cargo.lock and fuzz/Cargo.lock before push,
avoiding CI failures from lock file mismatch.
2026-03-30 09:00:49 +02:00
Aaron Ang c9c78b2415 chore: run pre-commit on all files (#10119) 2026-02-04 22:12:53 +01:00
Martin Kunkel e41c1405c9 Add devcontainer setup and small related fixes
- Added devcontainer configuration based on Ubuntu 24.04
- Added GitHub Actions workflow for devcontainer testing
- Update cSpell configuration to ingore spelling in devcontainer configs
- Update pre-commit hooks to exclude cSpell.json because pre-commit
  fails for that file due to json with comments format
- Fix filename for cSpell config in vscode settings
- Two tests in `test_dd.rs` are now skipped if /dev/sda1 is not
  available, which is the case in devcontainer
- Update check for existing gnu clone in build-gnu.sh, not checking the
  existence of the directory but the presence of the .git directory.
  This allows us to have the directly as a volume mount in devcontainer
- Remove temporary file `g` after use in build-gnu.sh
2025-08-18 07:34:16 +00:00
Sylvestre Ledru eaa6d228b1 Use mozilla fluent linter (and remove mine) 2025-06-28 19:01:33 +02:00
Sylvestre Ledru 599a958454 Add a fluent precommit hook 2025-06-21 19:30:22 +02:00
Sylvestre Ledru 3c29c77ffa Make cspell pre-commit hook optional with skip message 2025-06-10 20:41:49 +02:00
Yuri Astrakhan f46e096d35 Add common pre-commit hooks
Pre-commits are usually used to minimize busy work by the contributors, e.g., by fixing extra spacing, formatting, etc. This PR adds various basic text file checks to the repo. I also made yaml spacing a bit cleaner.

I was a bit surprised it is used for `cargo clippy` because you wouldn't want clippy's auto-fixes to be auto-applied by CI, so usually GitHub workflow simply checks runs it regularly. This is outside of the scope for this PR, but perhaps it should be removed here?
2025-06-03 18:59:36 -04:00
Sylvestre Ledru 94132060b6 Merge pull request #8030 from drinkcat/clippy-better
clippy pre-commit/CI improvements
2025-05-29 15:05:15 +02:00
Nicolas Boichat 7f05fca1ae .pre-commit-config.yaml: Match config in CI
We need to enable -D warnings to get the same behaviour.
2025-05-29 13:55:32 +02:00
Nicolas Boichat 0ef7c205d0 .pre-commit-config.yaml: Do not fail cspell if all files are ignored
cspell pre-commit hook would fail if the only change was a
Cargo.lock change.

This fixes it.
2025-05-29 09:12:17 +02:00
Nicolas Boichat 4a959d4bdd .pre-commit-config.yaml: Also run cspell
That cuaght me a few times... I think it's reasonable to ask devs
to install cspell locally if they want to use the pre-commit hook.
2025-03-25 13:57:08 +01:00
Ben Wiederhake caa4d1c57b Change the git pre-commit actions to *actually* use stable
This is in response to #6715: e8bb8dffa1
The pre-commit actions have a higher MSRV than the overall project (1.70.0),
so if 1.70.0 is the configured default, this lead to problems (#6730).
This commit fixes the situation by specifying 'stable', whatever that means on the user's system.
2024-09-30 22:51:30 +02:00
David Campbell e8bb8dffa1 Change the git pre-commit actions to work on stable.
These are not being fixed, so it does not make sense to constantly
take on new lints. The fmts may never be stabilized. Currently,
you can not even commit, because it errors out. At least switch to
lints that make it to stable when they are released.
2024-09-19 12:15:04 -04:00
Jan Verbeek d06c074829 Run clippy on the full workspace
These lints were cluttering up the "problems" tab in my VS
Code. `--workspace` fixes the disparity.
2021-08-24 17:10:16 +02:00
Sylvestre Ledru 4a3703d218 fix a warning
it was showing:
[WARNING] normalizing pre-commit configuration to a top-level map.  support for top level list will be removed in a future version.  run: `pre-commit migrate-config` to automatically fix this.
2021-05-30 23:18:45 +02:00
Jan Scheer b9863e1cc4 fix precommit for clippy nightly 2021-05-30 21:01:38 +02:00
desbma be03c948ed Add pre-commit hook + run fmt (#1959) 2021-03-30 21:24:01 +02:00