|
2 | 2 |
|
3 | 3 | 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. |
4 | 4 |
|
5 | | -## Resources |
6 | | - |
7 | | -Following files are used to this project. |
8 | | - |
9 | | -- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl |
10 | | -- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt |
11 | | - |
12 | | -## Patch |
13 | | - |
14 | | -### add option for excluding directories |
15 | | - |
16 | | -From [zephyr](https://github.com/zephyrproject-rtos/zephyr) project: |
17 | | - |
18 | | -- https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d |
19 | | - |
20 | | -### Disable warning for "No structs that should be const ..." |
21 | | - |
22 | | -- https://github.com/nugulinux/docker-devenv/blob/master/patches/0002-ignore_const_struct_warning.patch |
| 5 | + |
23 | 6 |
|
24 | 7 | ## Action setup guide |
25 | 8 |
|
|
44 | 27 |
|
45 | 28 | The checkpatch action will posting comments for error/warning result to the PR conversation. |
46 | 29 |
|
| 30 | + |
| 31 | +
|
| 32 | +The capture image above shows the comments on the lines of code and the comments on the commit message. |
| 33 | +
|
47 | 34 | ### Pull Request from forked repository |
48 | 35 |
|
49 | 36 | 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. |
|
63 | 50 | uses: webispy/checkpatch-action@master |
64 | 51 | ``` |
65 | 52 |
|
66 | | -You can find the error/waring result from Github action console log. |
| 53 | +Due to the above limitations, you can check the comments directly in the console log. |
| 54 | +
|
| 55 | + |
| 56 | +
|
| 57 | +## References |
| 58 | +
|
| 59 | +### checkpatch tool |
| 60 | +
|
| 61 | +Following files are used to this project. |
| 62 | +
|
| 63 | +- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl |
| 64 | +- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt |
| 65 | +
|
| 66 | +### Patch |
| 67 | +
|
| 68 | +#### Add option for excluding directories |
| 69 | +
|
| 70 | +From [zephyr](https://github.com/zephyrproject-rtos/zephyr) project: |
| 71 | +
|
| 72 | +- https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d |
| 73 | +
|
| 74 | +#### Disable warning for "No structs that should be const ..." |
| 75 | +
|
| 76 | +- https://github.com/nugulinux/docker-devenv/blob/master/patches/0002-ignore_const_struct_warning.patch |
| 77 | +
|
| 78 | +### Docker image |
| 79 | +
|
| 80 | +You can find the Dockerfile from [docker](https://github.com/webispy/checkpatch-action/tree/docker) branch of this repository. |
67 | 81 |
|
68 | | -# License |
| 82 | +## License |
69 | 83 |
|
70 | 84 | 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 commit comments