Closed PeterKietzmann closed 3 years ago
Can't reproduce :-/. When on the current version of dist/enh/doccheck-annotate
I get
No unexpected file in there
- Is it on purpose to have two locations of exclusion?
I guess so you can check the vendor
files for other static tests, but not for spelling errors.
@miri64 thanks for testing.
To 1.: Yes, I agree there might be reasons to do it in this way. At least in the case that not all static tests apply changed_files
unconditionally (didn't check). Fine with me.
To 2.: I wasn't precise enough in my test description above and adjusted it accordingly. The file that I was referring to does not actually have issues to be detected by codespell, however, it should be excluded since changed_files
is applied to the exclude list.
Would you mind to have an other look? Eventually, I simply misunderstand the code...
My last comment was incorrect. I deleted it.
Ok, so contrary to me you did not set the BASE_BRANCH
. Will try that out.
Ah! Due to the internal EXCLUDE
is overwritten by the provided EXCLUDE
(that is what the : ${EXCLUDE:=...}
construct is doing), dist/tools/coccinelle/include
is of course not in the EXCLUDE
list. Question is, was that intentional @aabadie? I could imagine you also want to check the spelling in the files that usually are excluded.
In the end, I simply want to skip the static tests for one single file (in #15671). The same situation applies to vendor headers, I guess, but couldn't find a common blacklist. Manually adding the file to every test script seemed off...
Manually adding the file to every test script seemed off...
Only the ones that change EXCLUDE
, right? And then there is the question why you want to exclude it in the first place? pkg/mbedtls/include/riot_config.h
seems very RIOT-specific to me, so I guess it is not an external import. If it is: since you are in a pkg
, can't you import it via the pkg
mechanism as well?
Only the ones that change EXCLUDE, right?
Yes, but I think this is not an option. For the other question, I'd rather answer it in the other PR.
Only the ones that change EXCLUDE, right?
Yes, but I think this is not an option. For the other question, I'd rather answer it in the other PR.
Yeah, I already commented on the file in question. See https://github.com/RIOT-OS/RIOT/pull/15671#discussion_r545320922
was that intentional @aabadie?
Could be but not sure. I would bet on a misunderstanding of the changed_files script.
This pattern seems to be used in several checks:
$ git grep EXCLUDE= dist/
dist/tools/codespell/check.sh:EXCLUDE='^(.+/vendor/)'
dist/tools/codespell/check.sh:FILES=$(FILEREGEX=${FILEREGEX} EXCLUDE=${EXCLUDE} changed_files)
dist/tools/flake8/check.sh:EXCLUDE="^(.+/vendor/\
dist/tools/flake8/check.sh:FILES=$(FILEREGEX=${FILEREGEX} EXCLUDE=${EXCLUDE} changed_files)
dist/tools/vera++/check.sh:EXCLUDE='^(.+/vendor/)'
dist/tools/vera++/check.sh:FILES=$(FILEREGEX=${FILEREGEX} EXCLUDE=${EXCLUDE} changed_files)
And it's just to exclude the vendor directory, which is already excluded in changed_files.sh. So I guess this could be removed (except for flake8 which also excludes other paths with Python code). Will open a PR.
Description
Multiple static tests use changed_files.sh to exclude files from being tested, for example, codespell. If I understand it correctly, the exclude list is generated from a local
EXCLUDE
variable and the one in changed_files.EXCLUDE
does not work properly.Steps to reproduce the issue
echo "${FILES}"
dist/tools/codespell/check.sh | grep dist/tools/coccinelle/include
Expected results
The list should not include files from dist/tools/coccinelle/include since it is excluded.
Actual results
The printed list contains dist/tools/coccinelle/include/riot-standard.h.
Versions