Skip to content

Conversation

N11cc00
Copy link
Contributor

@N11cc00 N11cc00 commented Sep 5, 2025

Contribution description

This is part of a greater effort to replace all header guards in RIOT with #pragma once. This PR only affects all headers under pkg/, excluding those that have a path that contains /vendor/.

It should now remove double empty lines around the #ifndef block.

Issues/PRs references

Tracking issue #21335

@github-actions github-actions bot added Area: network Area: Networking Area: pkg Area: External package ports Area: BLE Area: Bluetooth Low Energy support Area: LoRa Area: LoRa radio support labels Sep 5, 2025
@N11cc00 N11cc00 changed the title pkg: replace header guards with #pragma once #21517 pkg: replace header guards with #pragma once Sep 5, 2025
@crasbe crasbe added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 5, 2025
@riot-ci
Copy link

riot-ci commented Sep 5, 2025

Murdock results

✔️ PASSED

ed70f6a pkg/libb2/include/libb2_config.h: removed empty line

Success Failures Total Runtime
10515 0 10516 10m:16s

Artifacts

@N11cc00 N11cc00 force-pushed the fix-pkg-headers branch 3 times, most recently from 52167ef to 512a3fa Compare September 6, 2025 12:23
@crasbe
Copy link
Contributor

crasbe commented Sep 8, 2025

I did not go through these files yet, but maybe you can run the latest revision of the script on this PR too?

Copy link
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

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

I'm about halfway through, but the script still does not seem to be 100% reliable at the #endifs regarding double newlines. Maybe you can check it again and adapt it?

Copy link
Contributor

Choose a reason for hiding this comment

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

/*
 * Generated by ./update_mk.sh, don't modify directly.
 * Default CONFIG_ parameters from the SDK package.
 */

This file should probably not be modified directly.

#ifdef __cplusplus
}
#endif

Copy link
Contributor

Choose a reason for hiding this comment

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

Double newline.

#endif

#endif /* LUA_BUILTIN_H */

Copy link
Contributor

Choose a reason for hiding this comment

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

Double newline.

extern "C"
}
#endif

Copy link
Contributor

Choose a reason for hiding this comment

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

Double newline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated: it was good that this file got migrated, because the closing header guard was before the _cplusplus thingy. That would've caused weird issues when using C++...

#endif

#endif /* OPENDSME_OPENDSME_H */

Copy link
Contributor

Choose a reason for hiding this comment

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

Double newline.

#ifdef __cplusplus
}
#endif

Copy link
Contributor

Choose a reason for hiding this comment

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

Double newline.

@crasbe
Copy link
Contributor

crasbe commented Sep 12, 2025

I reviewed the rest of the files and found no further issues. So once the remaining review comments are addressed, we can get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BLE Area: Bluetooth Low Energy support Area: LoRa Area: LoRa radio support Area: network Area: Networking Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants