Pre-commit and PR linters and check scripts - #30
Open
joniohtonen wants to merge 2 commits into
Open
Conversation
…heck_spdx_headers script) during commit for changed files, added workflow for running similar checks for changed fiels during PR creation.
Contributor
Author
|
Fixed linter errors in the workflow itself. |
lauri9
reviewed
Aug 26, 2026
lauri9
left a comment
Contributor
There was a problem hiding this comment.
This looks like a good starting point.
Could you generate some documentation, e.g., to CONTRIBUTING.md or README.md about these checks and how to run them locally? This would help developers and agents keep up the standards set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added pre-commit checks/linting (ruff, yamllint, shellcheck, custom check_spdx_headers script) during commit for changed files, added workflow for running similar checks for changed fiels during PR creation.
Background
We are missing a programmatical approach for ensuring quality in our codebase. Using pre-commit to enforce certain aspects of the QC is an easy first step, as well as using a dedicated workflow for running the same checks that the PRs stay uniform in this regard too.
Goals
Enable automated, rudimentary QC when it comes to raw code and configurations files in order to avoid errors due to testing oversights etc.
Tasks
Tests
Other
Majority of the existing Python and YAML files had some aspects that ruff and yamllint were opinionated about, mostly whitespace, so the pre-commit and the PR workflow only check for changed files. This is to ensure that there isn't a sudden megacommit consisting whitespace fixes etc.