webispy / checkpatch-action

Github action for checkpatch.pl
7 stars 6 forks source link

checkpatch: ignore UNKNOWN_COMMIT_ID #27

Closed johankor closed 1 year ago

johankor commented 1 year ago

Set checkpatch option to ignore unresolved/missing SHA (commit) references in commit text.

Checkpatch will by default try to resolve SHA (commit) references in commit text, and emit a warning if unable to do so. Since the script is not run with a git tree, it will always fail to resolve/find these commits. Hence, specify that checkpatch shall ignore any such failure.

johankor commented 1 year ago

@webispy : Setting to draft as this is untested, and more of an RFC. If you agree this option makes sense, I'll gladly do a test run to verify behavior.

webispy commented 1 year ago

Thank you for submitting the PR, but the --ignore option can be configured in each project through the .checkpatch.conf file.

johankor commented 1 year ago

Thanks, that is indeed a possible solution. But, if my understanding is correct, this seems to be an option that makes sense when run via checkpatch-action, but not if scripts/checkpatch.pl is run directly in the repository. Somewhat similar to the --no-tree option.

webispy commented 1 year ago

Since most places where checkpatch-action is used are not Linux source trees, the --no-tree option was applied as default for convenience.

For other options, you can create a .checkpatch.conf file in each repository as described previously and add the desired settings to it.

Please refer to the following links

If what you really want is to use only the action yaml without creating the .checkpatch.conf file in your repository, I would consider adding it with the with option as shown below.

- name: Run checkpatch review
  uses: webispy/checkpatch-action@v9
  with:
    options: --ignore UNKNOWN_COMMIT_ID