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

make: add checkpatch to Makefile #730

Closed

Conversation

martin-belanger
Copy link
Contributor

@igaw - Hi Daniel. I noticed that you are asking people to run the checkpatch.pl script to make sure the code follows the same coding style as the kernel. To make it easier for developers to check their code, I added a new command to the Makefile (i.e. make checkpatch). Hopefully you will find this useful. Otherwise, please ignore.

This automatically retrieves the checkpatch.pl script from the Linux kernel repo and runs it to check the modified or untracked source files in the current repo.

The command can be invoked with:

$ make checkpatch

This automatically retrieves the checkpatch.pl script from the
Linux kernel repo and runs it to check the modified or untracked
source files in the current repo.

The command can be invoke with:
$ make checkpatch

Signed-off-by: Martin Belanger <[email protected]>
@igaw
Copy link
Collaborator

igaw commented Oct 31, 2023

I don't mind something like this to the Makefile, though it might be simpler just to add it to scripts/build.sh (or scripts/check.sh and call this from the Makefile).

Though I think it would also be nice if it could support my main use case, which is checking all new commits. That could also be useful as CI step. Just saying :)

Do you think this is feasible?

@martin-belanger
Copy link
Contributor Author

martin-belanger commented Oct 31, 2023

Do you think this is feasible?

Ok. I will look into it. But if I'm not mistaking, the code is not 100% "clean". Adding this to the CI will require cleaning all of the code.

@martin-belanger
Copy link
Contributor Author

@igaw - I found a GitHub action that performs the checkpatch.

https://github.com/webispy/checkpatch-action

I will try that instead of the changes I made to the Makefile.

I'm closing this pull request.

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