Repository navigation
Swap travis and jenkins checkpatch roles #1988
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,10 @@ jobs: | |
| include: | ||
| - if: type = pull_request | ||
| name: checkpatch | ||
| script: | ||
| script: # FIXME: replace with TRAVIS_COMMIT_RANGE or similiar | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @marc-hb I I don't have comment on actual functionality, but I object to this spelling change :) My brain just emits a lot of warnings for "similiar" and Collins agrees: https://www.collinsdictionary.com/dictionary/english/similar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 on that, I'm not aware of any such word and "similar" is the correct form.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
:-) |
||
| - SHA_PR=`git log --oneline -1 | sed -rn "s/.*Merge (.*) into.*/\1/p"` | ||
| - SHA_MAIN=`git log --oneline -1 | sed -rn "s/.*Merge .* into (.*)/\1/p"` | ||
| - git fetch https://github.com/marc-hb/linux checkpatch-strict-not-fatal && git cherry-pick FETCH_HEAD | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not add an SOF-specific script in the SOF tree, and avoid dependencies something we don't see and can't make PRs on.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I mentioned in the first github comment, this location wasn't meant to be final. I can add this two lines long checkpatch commit as a .patch in the Earlier I suggested a dedicated, thesofproject/linux/ branch different from
I don't think you want me to edit
Let me know your preference.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I meant was ADDING a new scripts/sof-checkpatch-strict.pl, and we update this file on each kernel revision to align with checkpatch.pl/ Then you can change line 22 of the .yaml file below to use the strict file
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, no problem I can add
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, but that process was for developers. This is an infrastructure patch so we can be flexible. Same as for the .yaml thing
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If a somewhat "impure" sof-dev branch is acceptable, then I have a better checkpatch option than duplicating and diverging the entire script. See topic/sof-dev...marc-hb:checkpatch-no-strict-fails Demo: It is a bit longer than the 2 lines and just 1 hunk of topic/sof-dev...marc-hb:checkpatch-strict-not-fatal so the risk of git conflict is a bit higher but barely: 5 lines and 3 hunks. Smaller than I expected.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I honestly prefer a different file to avoid merge conflicts which may or may not work and result in CI flagging false positive or not flagging true issues. We'd know it's our own thing.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @plbossart Hmm, but if we anyways need to take a look at checkpatch changes at every rebase, why not maintain a patch that modifies checkpatch.pl directly in sof-dev? Anyways us maintainers need to take a look at the file at each rebase, so why not let git help us. When we upload a new rebase PR, we'll get results whether we broke the CI checks not (i.e. whether we screwed up the checkpatch rebase or not).
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course an even simpler solution that doesn't require any checkpatch change at all is to simply drop PS: pushing code first and then discussing "requirements" later deep down this PR is not ideal but was intentional. I could have opened a github issue to discuss requirements first but: it's generally hard to get code reviews, it's harder to get CI code reviews and IMHO it's nearly impossible to get reviews of micro CI requirements like this one. Why I opted for the "send patches" + demo approach.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should really revisit the whole thing. IIRC Travis has different - stricter - compilation options than Jenkins. |
||
| - scripts/checkpatch.pl --strict --codespell -g $SHA_MAIN..$SHA_PR | ||
| - name: "Code Scan" | ||
| script: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use DO NOT MERGE in the subject.
e.g DO NOT MERGE: Fkae checkpatch ...