Skip to content

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

Merged
crasbe merged 1 commit intoRIOT-OS:masterfrom
crasbe:pr/pragma_headerguards
Apr 6, 2025
Merged

dist/tools: add #pragma once to headerguard check#21367
crasbe merged 1 commit intoRIOT-OS:masterfrom
crasbe:pr/pragma_headerguards

Conversation

@crasbe
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@crasbe
Copy link
Copy Markdown
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