[binutils-gdb] [pre-commit] Run yamllint in strict mode
Tom de Vries via Binutils-cvs <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils.cvs |
|---|---|
| Message-ID | <20260827065620.CED024BA2E39__15394.532580261$1787813790$gmane$org@sourceware.org> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=254d8547e1cf4965748d800ce8e73dc419cb5acd commit 254d8547e1cf4965748d800ce8e73dc419cb5acd Author: Tom de Vries <[email protected]> Date: Thu Aug 27 08:56:17 2026 +0200 [pre-commit] Run yamllint in strict mode While working on a patch series, I ran pre-commit in verbose mode and found that yamllint showed a warning. By default, yamllint runs in non-strict mode, so it doesn't return non-zero if there are only warnings [1]. Consequently, the hook won't fail, and the warning will be hidden. Fix this by running yamllint in strict mode. [1] https://yamllint.readthedocs.io/en/stable/configuration.html#errors-and-warnings Diff: --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53e4c5033c1..24d8ccad604 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -108,6 +108,11 @@ repos: hooks: - id: yamllint files: '^\.pre-commit-config.yaml$' + # By default warnings don't cause yamllint to return non-zero, so they: + # - don't cause the hook to fail, and + # - are hidden unless pre-commit runs in verbose mode. + # Enable strict mode to make sure we see and fix warnings. + args: [--strict] # Local hooks. - repo: local