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

[quality] add C/C++ header file nclude guard check #40

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

timothytrippel
Copy link
Collaborator

@timothytrippel timothytrippel commented Oct 16, 2024

This adds a CI check for include guards in C/C++ header files. Additionally this fixes existing include guards in the code base to be style guide compliant.

@timothytrippel timothytrippel changed the title Add include guard check [quality] add C/C++ header file nclude guard check Oct 16, 2024
Copy link
Collaborator

@cfrantz cfrantz left a comment

Choose a reason for hiding this comment

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

A couple of nits to improve long-term re-usability, but ok to commit as-is.

util/BUILD.bazel Show resolved Hide resolved
util/fix_include_guard.py Show resolved Hide resolved
This adds include guard lint/fix rules to keep C/C++ header files lint
clean.

Signed-off-by: Tim Trippel <ttrippel@google.com>
This fixes the C/C++ header file include guards to pass the lint check.

Signed-off-by: Tim Trippel <ttrippel@google.com>
@timothytrippel timothytrippel merged commit d280989 into lowRISC:main Oct 16, 2024
4 checks passed
@timothytrippel timothytrippel deleted the add-include-guard-check branch October 16, 2024 23:25
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