When a new check_function is added to check-package, often there are files in the tree that would generate warnings. An example is the Sob check_function for patch files: | $ ./utils/check-package --i Sob $(git ls-files) >/dev/null | 369301 lines processed | 46 warnings generated Currently these warnings are listed when calling check-package directly, and also at the output of pkg-stats, but the check_function does not run on 'make check-package' (that is used to catch regressions on GitLab CI 'check-package' job) until all warnings in the tree are fixed. This (theoretically) allows new .patch files be added without SoB, without the GitLab CI catching it. So add a way to check-package itself ignore current warnings, while still catching new files that do not follow that new check_function. Add a file named .checkpackageignore to the buildroot topdir. It contains the list of check_functions that are expected to fail for each given intree file tested by check-package. Each entries is in the format: <filename> <check_function> [<check_function> ...] These are 2 examples of possible entries: package/initscripts/init.d/rcK ConsecutiveEmptyLines EmptyLastLine Shellcheck utils/test-pkg Shellcheck Keeping such a list allows us to have fine-grained control over which warning to ignore. In order to avoid this list to grow indefinitely, containing entries for files that are already fixed, make each entry an 'expected to fail' instead of just an 'ignore', and generate a warning if a check_function that was expect to fail for a given files does not generate that warning. Unfortunately one case that do not generate warning is an entry for a file that is deleted in a later commit. By default, all checks are applied. The --ignore-list option allows to specify a file that contains the list of warnings that should be ignored. The paths in the ignore file must be relative to the location of the ignore file itself, which means: - in the main Buildroot tree, the paths in the ignore file are relative to the root of the main Buildroot tree - in a BR2_EXTERNAL tree, if the ignore file is at the root of the BR2_EXTERNAL, the paths it contains must be relative to that root of the BR2_EXTERNAL This is one more step towards standardizing the use of just 'make check-package' before submitting patches to the list. Cc: Sen Hastings <sen@phobosdpl.com> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.checkpackageignore | ||
.clang-format | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.shellcheckrc | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches