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

Use action-suggester instead of a patched reviewdog #433

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsarzy
Copy link
Contributor

@jsarzy jsarzy commented Jun 22, 2022

Remove clang-format from the "push" event. Annotations
do not support suggestions, so there is no sense to apply
clang-format directly to commits.

Use action-suggester instead of a patched reviewdog.

poc phoenix-rtos/phoenix-rtos-tests#116

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@jsarzy jsarzy requested a review from nalajcie June 22, 2022 12:37
Remove clang-format from the "push" event. Annotations
do not support suggestions, so there is no sense to apply
clang-format directly to commits.

Use action-suggester instead of a patched reviewdog.

JIRA: CI-123
Copy link
Member

@nalajcie nalajcie left a comment

Choose a reason for hiding this comment

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

lets assume checking formatting on direct-commit is a non-issue.

Suggesting some small enhancements to implement.

REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git diff -U0 HEAD^ | clang-format-diff-10 -p1 | /tmp/reviewdog -f=diff -f.diff.strip=0 -name=clang-format-pr -reporter=github-pr-review -fail-on-error
- run: git diff -U0 HEAD^ | clang-format-diff-10 -p1 | patch -p0
Copy link
Member

Choose a reason for hiding this comment

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

  • please name this step
  • IMHO using clang-format-diff -i would be more straightforward instead of pipe'ing it to patch
  • maybe comment how it works (we won't be parsing the tool output, the changes are applied to the code and analyzed in the next step)

@@ -15,32 +15,6 @@ on:
workflow_call: # reusable workflow - the same jobs in submodules

jobs:
clang-format:
if: github.event_name == 'push'
Copy link
Member

Choose a reason for hiding this comment

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

removed only job run on push, You can adjust the global on properties and remove if in the jobs.

@jsarzy jsarzy marked this pull request as draft June 27, 2022 13:33
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