aboutsummaryrefslogtreecommitdiffstats
path: root/etc
AgeCommit message (Collapse)AuthorFilesLines
2025-11-06etc/cpplint/cpplint.cfg: Ignore build/include_what_you_useAlejandro Colomar1-2/+1
We already run iwyu(1) on a separate target (lint-c-iwyu). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20share/mk/, etc/clang-tidy: Silence diagnostics about unnamed parametersAlejandro Colomar1-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-08etc/checkpatch/checkpatch.conf: Ignore TYPO_SPELLINGAlejandro Colomar1-0/+1
It suggest 'cancellation' instead of 'cancelation', but we want the latter. Since it hasn't caught anything useful, AFAIR, turn it off. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-14etc/cppcheck/cppcheck.suppress: Suppress staticFunctionAlejandro Colomar1-0/+1
For example, in backtrace(3) we don't want to use 'static'. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-14etc/cppcheck/cppcheck.suppress: Suppress nullPointerOutOfMemoryAlejandro Colomar1-0/+1
It causes false positives: CPPCHECK .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c.lint-c.cppcheck.touch .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: warning: inconclusive: If memory allocation fails, then there is a possible null pointer dereference: fhp [nullPointerOutOfMemory] fhp->handle_bytes = 0; ^ .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assuming allocation function fails fhp = malloc(fhsize); ^ .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assignment 'fhp=malloc(fhsize)', assigned value is 0 fhp = malloc(fhsize); ^ .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: note: Null pointer dereference fhp->handle_bytes = 0; ^ Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-22etc/checkpatch/checkpatch.conf: Ignore MACRO_ARG_PRECEDENCEAlejandro Colomar1-0/+1
This diagnostic is useful for preventing unsafe macros, but other linter programs provide a smaller rate of false positives, so let's turn this one off. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-22etc/clang-tidy/config.yaml: -clang-diagnostic-sign-conversionAlejandro Colomar1-0/+1
This diagnostic is too noisy, and isn't very useful. Turn it off. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03etc/clang-tidy/config.yaml: -misc-include-cleanerAlejandro Colomar1-0/+1
We want to enable this warning again in the future, but for now it has too many false positives. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03etc/clang-tidy/config.yaml: -cppcoreguidelines-macro-to-enum, ↵Alejandro Colomar1-0/+2
-readability-avoid-nested-conditional-operator Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03etc/shellcheck/shellcheckrc: disable=SC2250Alejandro Colomar1-0/+1
Adding braces unnecessarily adds noise and thus hurts readability. Ignore advice. === In src/bin/mansect line 23: -e '(?s)^\.SH ('"$s"')$(?:(?!^\.(lf 1|TH|SH) ).)*'; ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. === Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03etc/shellcheck/shellcheckrc: disable=SC2016Alejandro Colomar1-0/+1
This triggers false positives with trivial PCRE2 regexes. === In src/bin/mansect line 23: -e '(?s)^\.SH ('"$s"')$(?:(?!^\.(lf 1|TH|SH) ).)*'; ^----------------------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. === Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03etc/shellcheck/shellcheckrc: disable=SC2038Alejandro Colomar1-0/+1
We don't want to support arbitrary manual-page file names. === In src/bin/mansect line 17: find -H "$@" -not -type d \ ^-----------------------^ SC2038 (warning): Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. === Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scriptsAlejandro Colomar1-0/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-02etc/cppcheck/cppcheck.suppress: Add unusedStructMemberAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26etc/clang-tidy/config.yaml: -llvm-header-guardAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26etc/cpplint/cpplint.cfg: -build/header_guardAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-26etc/cppcheck/cppcheck.suppress: Silence reportAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-26share/mk/, etc/: Fix dependenciesAlejandro Colomar2-0/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-18etc/clang-tidy/config.yaml: Ignore 'modernize-macro-to-enum'Alejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-09-07clang-tidy/config.yaml: Silence some warningsAlejandro Colomar1-0/+12
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-31CPPLINT.cfg: Ignore warnings with false positivesAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-31checkpatch/config: Ignore warnings with false positivesAlejandro Colomar1-0/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-31cppcheck.suppress: knownConditionTrueFalse: Silence a warning with false ↵Alejandro Colomar1-0/+1
positives Link: <https://lore.kernel.org/linux-man/e13c74fb-e17a-ba14-f1fc-9c75f05090db@kernel.org/T/#u> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-31cppcheck.suppress: constParameterCallback: Ignore false positives in libc ↵Alejandro Colomar1-0/+1
callbacks Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-31cppcheck.suppress: constParameter: Ignore false positives due to main() argvAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-04-23groff.mk, checkstyle.tmac: Remove unnecessary tmac fileAlejandro Colomar1-13/+0
We used it for transforming groff_man(7)'s CHECKSTYLE into errors, but we already do that with grep(1). Moreover, the tmac was hiding troff(1)'s warnings. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-01-26cppcheck.suppress, lint-c.mk: lint-c-cppcheck: Add cppcheck(1) to the C lintersAlejandro Colomar1-0/+8
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-09-13.checkpatch.conf: Ignore some warningsAlejandro Colomar1-0/+3
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-09-12config.yaml: Ignore some clang-tidy warningsAlex Colomar1-0/+6
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
2022-08-17clang-tidy/config.yaml: Ignore a useless warningAlejandro Colomar1-0/+1
-readability-identifier-length Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-08-01.checkpatch.conf, CPPLINT.cfg: Ignore some warnings from 'make lint-c'Alejandro Colomar2-1/+2
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-05-21checkstyle.tmac: Put all groff -rCHECKSTYLE stuff in a single fileAlejandro Colomar2-7/+10
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-05-03.checkpatch.conf, Makefile, etc/checkpatch/config: lint-checkpatch: Add new ↵Alejandro Colomar1-0/+29
target to run checkpatch(1) Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-05-03CPPLINT.cfg, Makefile, etc/cpplint/CPPLINT.cfg: lint-cpplint: Add new target ↵Alejandro Colomar1-0/+2
to run cpplint(1) Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-05-02etc/clang-tidy/config.yaml: Suppress some warnings/errorsAlejandro Colomar1-1/+28
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-04-30etc/clang-tidy/config.yaml: Silence irrelevant warnings from clang-tidy(1)Alejandro Colomar1-0/+10
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-04-30Makefile, etc/clang-tidy/config.yaml: lint-clang-tidy: Add target to run ↵Alejandro Colomar1-0/+7
clang-tidy(1) to lint example programs Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-03-20checkstyle.tmac: Silence groff CHECKSTYLE warning for blank linesAlejandro Colomar1-0/+3
Code examples contain many blank lines. That warning, although sometimes valid, is too noisy. Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-03-18Makefile, etc/groff/tmac/deadly.tmac: Add lint and lint-groff targetsAlejandro Colomar1-0/+7
'lint' is a metatarget that triggers all lint-* targets (currently that is just 'lint-groff'). 'lint-groff' is a target that runs groff -rCHECKSTYLE to check manual pages' groff(7) correctness. etc/groff/tmac/deadly.tmac is a file written by Branden, to make groff(1) abort when it finds a style problem, which then causes make(1) to also abort. CC: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>