This moves CONFIG_LLVM_USE_LD into cmake/toolchain/llvm as this
is a toolchain kconfig. Also make it a choice to allow the use
of LLVM's lld as linker.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds a Kconfig for MCUboot which is used in the documentation to
the CI Kconfig check allow list.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
WebP images are smaller for similar resolutions and quality while being
compatible with web browsers and other image processing tools.
For higher resolution images, be sure to limit the display size to make
the rendered pages look reasonable.
This was approved by Benjamin Cabé (@kartben) in this discussion thread:
https://github.com/zephyrproject-rtos/zephyr/pull/55488#issuecomment-1461792751
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
To get consistent and 1 single rundate per CI run, set run_date when
we upload the data. This is optional mostly for CI and to avoid
duplication when we re-run jobs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This should fix issue like #54337 where architecture code changes were
filtering out kernel tests, where those changes are being tested. Kernel
and arch code is tightly coupled and we need to run kernel tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change the check_compliance main invocation to pass an explicit argv
list from main to parse_args(). This does not change anything for direct
invocation, but allows wrapping the compliance script and using it as a
library while controlling its behavior by passing the intended flags to
main().
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move away from opensearch and switch to elasticsearch for reporting.
The results will be available at https://kibana.zephyrproject.io/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enables running CI checks which will now search for initialisation
of argument parser where abbreviations are not disabled.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Support running the compliance check script without writing the output
to any file.
This adds a check for the --output flag to not write to the output file
if the value is empty, and add a second flag for inhibiting the
individual case files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a YAMLLint compliance check that uses the yamllint package to report
linting error on YAML files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix all comments-indentation errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(comments-indentation)'
This checks that the comment is aligned with the content.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a compliance check that tries to load MAINTAINERS.yml with
get_maintainer.Maintainers() if it's been modified by the CL, and fail
compliance if it fails to be parsed.
Example output:
```
ERROR : Test MaintainersFormat failed:
Error parsing MAINTAINERS.yml: MAINTAINERS.yml: YAML error: while
scanning a simple key
in "MAINTAINERS.yml", line 976, column 1
could not find expected ':'
in "MAINTAINERS.yml", line 977, column 3
```
```
ERROR : Test MaintainersFormat failed:
Error parsing MAINTAINERS.yml: MAINTAINERS.yml: glob pattern
'drivers/regulator' in 'files' in area 'Drivers: Regulators' matches a
directory, but has no trailing '/'
```
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change the bindings file filter to check for "dts/bindings/" as a
substring rather than prefix. This makes the check catch files in
subdirectories as well (for sample tests and samples), and makes the
check usable on external projects where the bindings may not live in the
project root.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move the file iteration loops of the bindings compliance check in the
callers, so that if we add more checks we don't have iterate on each one
of them and a check works on a single file.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a check to validate and limit the size of images in the repository,
setting stricter limit for files in boards/.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Git normally only works on files, but can include directories if there's
any submodule in the repository. This is currently checked in
filter_py(), move the check into get_files() so it does not have to be
copied around.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
DevicetreeBindingsCheck is missing the splitlines() call to process the
get_files() output, hence cycling through each character of the output
rather than each file, which causes the check to never run on anything.
Fix it by moving the splitline call into get_files() itself, since every
caller is going to use it anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit updates the KconfigCheck to add the Kconfig symbols from
both "config" and "choice" symbol lists to the defined symbol list, as
opposed to the "config" list only, in order to prevent any references
to the choice symbols outside the Kconfig files (e.g. in documentation)
from being reported as undefined.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
path for posix was not being matched correctly due to a missing /. So
some posix tests were excluded and not excercised.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit calculate memory footprint from build.log and
proposes an alternative approach to #2465.
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Both get_defined_syms and UNDEF_KCONFIG_WHITELIST are used exclusively
by the Kconfig check, so move them to the class.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Instead of globally resolving ZEPHYR_BASE, move it to _main() so we can
catch potential exceptions when doing so and for consistency with the
rest of globals, like GIT_TOP. This also includes documenting a new
"<zephyr-base>" path hint for classes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The global variable ZEPHYR_BASE is always set in the script, so no need
to check for its existence.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some errors are attributable to a specific file, but not a specific line
within that file. Allow for formatted errors that refer to a file but
not a line.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Many tests invoke `git diff` independently with very similar parameters
to obtain a filtered list of files.
Consolidate those into a new `get_files()` function.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The workaround for old pytest bug
https://github.com/PyCQA/pylint/issues/2906
is not required anymore after more than 3 years, so remove it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
There were many instances in the code where f-strings were more
appropriate or fitting, change those to use them.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As per the current Python documentation, use subprocess.run() since the
other, older methods are not recommended anymore.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The checkpatch regex matched too greedily, so that descriptions with ":"
would match too much, example:
-:20: ERROR:SPACING: spaces required around that '=' (ctx:VxW)
Would match "SPACING: spaces required around that '=' (ctx" instead of
just "SPACING".
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a compliance check that fails if the diff is adding any binary file
to prevent committing them by mistake.
Only check for added files and explicitly allow image files in doc/ and
boards/.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Check names must not contain spaces, since they are passed via `-m` in
the command-line.
Also update .gitignore and compliance.yml.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add `DevicetreeBindingsCheck` and `required_false_check()`, which
checks to make sure that no new Devicetree bindings add the
redundant `required: false` property.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Parse the output generated by pylint and store it as FmtdFailure
instances, so that they can be annotated later.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>