|
From: | Richard Henderson |
Subject: | Re: Exclude paths from checkpatch (was: Re: [PATCH] Add minimal Hexagon target) |
Date: | Tue, 19 Nov 2019 14:33:05 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 11/19/19 9:51 AM, Philippe Mathieu-Daudé wrote: > I tried this quick way to filter some file/directory out of checkpatch.pl, and > it works nicely: > > $ cat .git/hooks/pre-commit > #!/bin/bash > exec git diff --cached -- ':(top)' $(test -e .checkpatchignore && sed -ne > '/^\(#.*\|$\)/ ! s/.*/:(exclude)\0/p' < .checkpatchignore) | > scripts/checkpatch.pl --no-signoff -q - > > $ cat .checkpatchignore > # A line starting with # serves as a comment. > # A blank line matches no files, so it can serve as a separator for > readability. > include/standard-headers > target/xtensa/core-* > target/hexagon/imported > > Would this be acceptable to reduce patchew false positives? > > git exclude pathspec trick from: > https://stackoverflow.com/questions/39931781/git-diff-stat-exclude-certain-files/39937070#39937070 Looks like a good solution to me. r~
[Prev in Thread] | Current Thread | [Next in Thread] |