Draft
Conversation
a18a10e to
c0ec50d
Compare
66a0dda to
51ccd81
Compare
48907a2 to
5c89f46
Compare
358889e to
f32440d
Compare
cb7ed4e to
42f706d
Compare
Update checkpatch.pl to v6.18.3 from upstream kernel.org [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/scripts/checkpatch.pl?h=v6.18.3 Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
This patch introduces .checkpatch.conf, which was obtained from the upstream Zephyr Project v4.2.0 [1]. Although this .checkpatch.conf has no SPDX ID, there is an Apache-2.0 license at the root of the upstream Zephyr Project Git repository. Therefore, .checkpatch.conf is distributed under Apache-2.0 and is being redistributed here under the same license. [1] https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/refs/tags/v4.2.0/.checkpatch.conf Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
Commit 8750afb introduced a change that ignores UNNECESSARY_ELSE in this Git repository. Hence, configure .checkpatch.conf to ignore UNNECESSARY_ELSE. Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
Commit 77d42a7 introduced a change that ignores NEW_TYPEDEFS in this Git repository. Hence, configure .checkpatch.conf to ignore NEW_TYPEDEFS. Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
To report '--max-line-length' violation with '--file',
'--strict' is required.
./scripts/checkpatch.pl --help | grep -A 2 max-line-length
--max-line-length=n set the maximum line length, (default 100)
if exceeded, warn on patches
requires --strict for use with --file
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
Instead of hard coding checkpatch configuration, use .checkpatch.conf. Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
This commit replaces all instances of C99 style comments '//' with C89 style comments '/* */'. This resolves all instances of "ERROR:C99_COMMENTS" from checkpatch. Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
checkpatch reports the following:
"WARNING:BRACES:
braces {} are not necessary for single statement blocks"
However, the upstream Zephyr coding guidelines [1] states the following:
"Add braces to every if, else, do, while, for and switch body, even for
single-line code blocks"
Therefore, ignore 'BRACES'.
[1] https://docs.zephyrproject.org/4.2.0/contribute/style/code.html
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
58ebf1c to
b25156e
Compare
This patch removes CHECK:LINE_SPACING reported by checkpatch.pl. Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
b25156e to
5f1e011
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces .checkpatch.conf, which was obtained from the upstream Zephyr Project v4.2.0 with a modification of adding --strict.
https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/refs/tags/v4.2.0/.checkpatch.conf
Although this .checkpatch.conf has no SPDX ID, there is an Apache-2.0 license at the root of the upstream Zephyr Project Git repository.
Therefore, .checkpatch.conf is distributed under Apache-2.0 and is being redistributed here under the same license.
This PR also aims to address #116.