Skip to content

dist/tools: add #pragma once to headerguard check #21367

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

Merged
merged 1 commit into from
Apr 6, 2025

Conversation

crasbe
Copy link
Contributor

@crasbe crasbe commented Apr 6, 2025

Contribution description

The headerguards static check currently does not know anything about #pragma once. However in #21335, the consensus was reached to use #pragma once, the static test should not fail for it.

Testing procedure

  1. Add a #pragma once to a header of your choice that already has the classic include guards (without removing them): the static test ./dist/tools/headerguard/check.sh should fail.
  2. Remove the classic include guards, the static test ./dist/tools/headerguard/check.sh should not fail.

Issues/PRs references

@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Apr 6, 2025
@crasbe crasbe added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 6, 2025
@riot-ci
Copy link

riot-ci commented Apr 6, 2025

Murdock results

✔️ PASSED

bf1491e dist/tools: add #pragma once to headerguard check

Success Failures Total Runtime
1 0 1 01m:16s

Artifacts

Copy link
Contributor

@Enoch247 Enoch247 left a comment

Choose a reason for hiding this comment

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

Looks good. Go ahead and squash.

@crasbe crasbe force-pushed the pr/pragma_headerguards branch from 7c250d0 to bf1491e Compare April 6, 2025 20:01
@crasbe crasbe added this pull request to the merge queue Apr 6, 2025
@crasbe
Copy link
Contributor Author

crasbe commented Apr 6, 2025

Thanks for reviewing :)

Merged via the queue into RIOT-OS:master with commit 9774a0c Apr 6, 2025
25 checks passed
@crasbe crasbe deleted the pr/pragma_headerguards branch April 6, 2025 20:13
@mguetschow
Copy link
Contributor

Thanks for doing this! We still have to update our coding convention and templates we may have somewhere.

@crasbe
Copy link
Contributor Author

crasbe commented Apr 7, 2025

Thanks for doing this! We still have to update our coding convention and templates we may have somewhere.

Indeed. I wanted to update the static-check first, so that it won't cause false failures in the migration process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants