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

[RFC] Introduce checkpatch action #474

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

vlrpl
Copy link
Contributor

@vlrpl vlrpl commented Jan 17, 2025

Reusing an existing GH action doesn't seem bad, but Cirrus would be fairly simple.

If Cirrus or in general we reach a consensus around not reusing the action used here, we have to decide whether we have to redistribute checkpatch.pl (and spelling.txt)

Included a couple of patches that intentionally introduce some coding style issues to show the pros and cons of the action.

Configs have been left intentionally loose, feel free to propose what you think could make sense.

@atenart
Copy link
Contributor

atenart commented Jan 20, 2025

While I like not having to distribute our own version of checkpatch (as we won't have to maintain and sync it), it has a major drawback: there's no way to check the coding style is correct locally before opening a PR. If we compare to the Rust & Python coding styles, they can be checked locally (although doing so for the Python part is not that straightforward...[1]).

[1] An addition would be to consolidate the various checks into a make target.

vlrpl added 2 commits January 30, 2025 20:50
Fixes: 12345 ("Mistaken fixes")
Signed-off-by: Paolo Valerio <[email protected]>
@vlrpl vlrpl force-pushed the checkpatch branch 7 times, most recently from 298d82b to b19d2a5 Compare January 31, 2025 00:05
The project, as stated in CONTRIBUTING have a strong preference for
the Linux kernel coding style.
This patch enforces it by adding automatic checks in the CI for bpf
sources.
The patch uses and import the current checkpatch.pl and its
requirement spelling.txt.

Signed-off-by: Paolo Valerio <[email protected]>
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