Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project+ci: Succeed ruff format check but keep a notice annotation #770

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

pdgendt
Copy link
Collaborator

@pdgendt pdgendt commented Dec 2, 2024

Prevent ruff issues being reported by updates of the tool itself.
UP027 has been removed in version 0.8.0, remove it from the ignore list.

For CI move the continue-on-error to the format step instead of the job. This should set the job status to green, we only print a notice annotation.

See #771 how the result looks.

Prevent ruff issues being reported by updates of the tool itself.

UP027 has been removed in version 0.8.0, remove it from the ignore list.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt added the DNM Do not merge label Dec 2, 2024
@pdgendt pdgendt removed the DNM Do not merge label Dec 2, 2024
run: |
echo "::warning file=${{ matrix.files.path }},title=File format check failed::Run 'ruff format ${{ matrix.files.path }}'"
echo "::notice file=${{ matrix.files.path }},title=Unformatted file::Consider running 'ruff format ${{ matrix.files.path }}'"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please tell the user that the formatted code can be found in the check logs.

(technically: the diff but no need to mention that here)

Github only has 2 states for the result of a job, either success or
error. A warning state would be nice but isn't available.

We still add a notice to changed files to suggest contributors to
format.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt merged commit 361004d into zephyrproject-rtos:main Dec 3, 2024
16 checks passed
@pdgendt pdgendt deleted the ruff-ci branch December 3, 2024 14:56
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.

2 participants