Skip to content

Rename C++ headers to .hpp and make checkpatch only check C code.#661

Merged
guvenc merged 1 commit intomainfrom
feature/checkpatch_cpp
Apr 4, 2025
Merged

Rename C++ headers to .hpp and make checkpatch only check C code.#661
guvenc merged 1 commit intomainfrom
feature/checkpatch_cpp

Conversation

@PlagueCZ
Copy link
Copy Markdown
Contributor

@PlagueCZ PlagueCZ commented Apr 3, 2025

To make checkpatch ignore C++ code, it needs to somehow tell it apart from C code.
As per @byteocean idea, we can filter the diffed files from git that are then sent over to checkpatch.
To filter header files however, C++ header files needed to be renamed.

Fixes #660

@github-actions github-actions bot added size/XS enhancement New feature or request labels Apr 3, 2025
@PlagueCZ PlagueCZ force-pushed the feature/checkpatch_cpp branch from 1f6e840 to ca44c3f Compare April 3, 2025 15:21
@github-actions github-actions bot added size/S and removed size/XS labels Apr 3, 2025
@PlagueCZ PlagueCZ marked this pull request as ready for review April 3, 2025 15:48
@PlagueCZ PlagueCZ requested a review from a team as a code owner April 3, 2025 15:48
Copy link
Copy Markdown
Contributor

@byteocean byteocean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added typos to .cpp, .go, .c files and only .c file was scanned by the script, as expected. Thanks @PlagueCZ.

Copy link
Copy Markdown
Contributor

@guvenc guvenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PlagueCZ
This was distracting the CI/CD output till today.

@guvenc guvenc merged commit ca44c3f into main Apr 4, 2025
6 checks passed
@guvenc guvenc deleted the feature/checkpatch_cpp branch April 4, 2025 16:03
@hardikdr hardikdr added this to Roadmap Jun 26, 2025
@hardikdr hardikdr moved this to Done in Roadmap Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Checkpatch raises errors on C++ code and patches

4 participants