Skip to content

ci: add compliance script checks to example repo - #101

Open
danieldegrasse wants to merge 3 commits into
zephyrproject-rtos:mainfrom
danieldegrasse:feature/compliance-script
Open

ci: add compliance script checks to example repo#101
danieldegrasse wants to merge 3 commits into
zephyrproject-rtos:mainfrom
danieldegrasse:feature/compliance-script

Conversation

@danieldegrasse

Copy link
Copy Markdown
Contributor

Add CI job to run compliance script checks within the example repo, as a demonstration of how to utilize and build on Zephyr's compliance checks.

This also enforces the compliance checks on this repo, so we need to reformat a few of the python scripts to comply with them

@danieldegrasse
danieldegrasse force-pushed the feature/compliance-script branch from f750b68 to bfaded7 Compare July 3, 2026 20:10
Comment thread LICENSES/Apache-2.0.txt

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compliance checks are failing due to extra newlines in this file, but I'm not sure if we want to strip those? I assume this license file was pulled directly from apache.org

@rettichschnidi rettichschnidi Jul 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO better not to strip. Messing with the defaults of what REUSE fetches will cause extra work when doing FOSS compliance.

Also, having an example on how to create an exception would be valuable too.

@danieldegrasse
danieldegrasse force-pushed the feature/compliance-script branch from bfaded7 to 872fa10 Compare July 3, 2026 20:13
@danieldegrasse
danieldegrasse marked this pull request as ready for review July 3, 2026 20:15
Comment thread .github/workflows/compliance.yml
@henrikbrixandersen

Copy link
Copy Markdown
Member

Retriggered CI.

Comment thread .ruff-excludes.toml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the upstream excludes files? I don't think so?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, probably not. I guess we only need the rules file from upstream. I'll drop this

@fabiobaltieri

Copy link
Copy Markdown
Member

ci is complaining for the license file, vaguely remember someone else bumping into this and saying we should force it rather than adding the missing eof \n because something somewhere may checksum the license file or something, @kartben was it you? am I making stuff up?

@danieldegrasse

Copy link
Copy Markdown
Contributor Author

ci is complaining for the license file, vaguely remember someone else bumping into this and saying we should force it rather than adding the missing eof \n because something somewhere may checksum the license file or something, @kartben was it you? am I making stuff up?

For what it's worth, the file hosted at https://www.apache.org/licenses/LICENSE-2.0.txt has a newline at the end- the file in this PR was copied from Zephyr. Do we know why there is a difference? It seems like we should be following the format of the file hosted by the Apache org

@danieldegrasse
danieldegrasse force-pushed the feature/compliance-script branch from 872fa10 to 5a0a695 Compare August 10, 2026 15:21
Add configuration files for linters used by Zephyr compliance checks.
These files are duplicated from the Zephyr repo.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
Format example_west_command to comply with ruff CI checks

Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
Add support for running compliance checks on code contributed to the
example repository, as a demonstration for how to implement custom
compliance checks on top of those Zephyr provides

Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
@danieldegrasse
danieldegrasse force-pushed the feature/compliance-script branch from 5a0a695 to 9988878 Compare August 10, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants