Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
dist/tools: add build system sanity check script #10179
Split from #10060
Add a script to execute sanity checks on build system files.
Currently adds a check for using the content of
Modules should not check the content of FEATURES_PROVIDED/_REQUIRED/OPTIONAL
The script cannot currently be enabled by default as there are some fixes that are not included:
The script correctly passes
You can list the current errors by running:
It finds the current violations on using
With the fixes to these, it runs silently without errors as done in #10060
referenced this pull request
Oct 17, 2018
The question I still have, is should I change the way of handling errors. I took this one from another script but fear it will not scale correctly when adding other tests.
It would currently make all errors have only one header with
I was thinking about adding a
It is not critical how we present it, as long as it is easy for the user to find and correct them.
This issue and the one with RIOTBASE, SCRIPTPATH, excluding the script file from the grep, etc are shared amongst all check scripts, so it may make more sense at some point to put all of that functionality in a shared file and
I tested this PR and got:
When testing with #10060 it has no errors.
It does make sense to enforce structure in the build system but I cannot say much more than that.
Thank you for testing, and indeed, since I created the PR, the first error line was fixed!
@MrKevinWeiss What you can answer, is would you like more output if you get this error on a PR.
jcarrano left a comment
I think the output is sufficient. If I am editing a makefile and for some reason add a FEATURES_PROVIDED in the wrong section it specifies where it shouldn't be and what exactly it is. I was more stating that I don't understand the details of how this effects the build system and if there are conditions where the violation is warranted. Either way I think it is good and trust your ability so I too will ACK and go!