Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Inho Oh <[email protected]>
  • Loading branch information
webispy committed Nov 1, 2019
1 parent 9fb45b1 commit bea6477
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@

The `checkpatch.pl` is a perl script to verify that your code conforms to the Linux kernel coding style. This project uses `checkpatch.pl` to automatically review and leave comments on pull requests.

## Resources

Following files are used to this project.

- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt

## Patch

### add option for excluding directories

From [zephyr](https://github.com/zephyrproject-rtos/zephyr) project:

- https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d

### Disable warning for "No structs that should be const ..."

- https://github.com/nugulinux/docker-devenv/blob/master/patches/0002-ignore_const_struct_warning.patch
![check](https://raw.githubusercontent.com/wiki/webispy/checkpatch-action/img/action_conversation_check.png)

## Action setup guide

Expand All @@ -44,6 +27,10 @@ jobs:
The checkpatch action will posting comments for error/warning result to the PR conversation.
![check](https://raw.githubusercontent.com/wiki/webispy/checkpatch-action/img/action_conversation_comment.png)
The capture image above shows the comments on the lines of code and the comments on the commit message.
### Pull Request from forked repository
The Github action has a limitation that doesn't have write permission for PR from forked repository. So the action cannot write a comment to the PR.
Expand All @@ -63,8 +50,35 @@ jobs:
uses: webispy/checkpatch-action@master
```
You can find the error/waring result from Github action console log.
Due to the above limitations, you can check the comments directly in the console log.
![console log](https://raw.githubusercontent.com/wiki/webispy/checkpatch-action/img/action_console.png)
## References
### checkpatch tool
Following files are used to this project.
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
### Patch
#### Add option for excluding directories
From [zephyr](https://github.com/zephyrproject-rtos/zephyr) project:
- https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d
#### Disable warning for "No structs that should be const ..."
- https://github.com/nugulinux/docker-devenv/blob/master/patches/0002-ignore_const_struct_warning.patch
### Docker image
You can find the Dockerfile from [docker](https://github.com/webispy/checkpatch-action/tree/docker) branch of this repository.
# License
## License
Since the `checkpatch.pl` file is a script in the Linux kernel source tree, you must follow the [GPL-2.0](https://github.com/torvalds/linux/blob/master/COPYING) license, which is your kernel license.

0 comments on commit bea6477

Please sign in to comment.