Skip to content

Conversation

@xmkg
Copy link
Member

@xmkg xmkg commented May 16, 2025

This PR replaces all instances of header guards with much simpler and widely supported #pragma once.

MULTI-1995

@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.31%. Comparing base (9cd0fa3) to head (15cdbb8).
⚠️ Report is 474 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4090   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files         259      259           
  Lines       15715    15715           
=======================================
  Hits        14036    14036           
  Misses       1679     1679           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ricab

This comment was marked as resolved.

@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from 2781021 to 5a39556 Compare May 22, 2025 07:52
@xmkg xmkg marked this pull request as ready for review May 22, 2025 07:54
@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from 5a39556 to 09d4e07 Compare May 22, 2025 08:02
@xmkg
Copy link
Member Author

xmkg commented May 22, 2025

LGTM, but it looks like a bunch of those files have space errors that are tripping up linting. Want to fix them too?

Done!

@xmkg xmkg requested a review from ricab May 22, 2025 08:29
@ricab
Copy link
Collaborator

ricab commented May 23, 2025

Hey @xmkg, I am afraid this will need another go 💦

@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from 09d4e07 to c989f79 Compare May 26, 2025 12:23
@xmkg
Copy link
Member Author

xmkg commented May 26, 2025

Hey @xmkg, I am afraid this will need another go 💦

No worries. I anticipated friction between the line-length branch and this one. Rebased to main, let's see if everything's still fine.

@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from c989f79 to db46a51 Compare May 26, 2025 12:32
@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from db46a51 to 210c0ff Compare May 26, 2025 12:35
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
@xmkg xmkg force-pushed the enhancement/replace-header-guards-with-pragma-once branch from 210c0ff to eb05c4c Compare May 26, 2025 14:43
@xmkg xmkg enabled auto-merge May 26, 2025 20:55
Copy link
Contributor

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

Great work! Neat to see this fixes some cases of bad header guards and missing copyrights too. But, you missed MULTIPASS_BLUEPRINTS_TEST_LAMBDAS_H ;)

@xmkg
Copy link
Member Author

xmkg commented May 28, 2025

But, you missed MULTIPASS_BLUEPRINTS_TEST_LAMBDAS_H ;)

Nah, that doesn't count... That's a source guard -- protecting against double inclusion of a source file. This PR is header guards only...

Just joking 😛 Probably somebody copied this from a header and forgot to remove the guard. I'll remove it :) Good catch!

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
@xmkg
Copy link
Member Author

xmkg commented May 28, 2025

BTW, I intentionally left the Flutter GUI header guards in place since some of them are generated code, and the rest is copied from the example app.

@xmkg
Copy link
Member Author

xmkg commented May 28, 2025

Great work! Neat to see this fixes some cases of bad header guards and missing copyrights too. But, you missed MULTIPASS_BLUEPRINTS_TEST_LAMBDAS_H ;)

Done!

@xmkg xmkg requested a review from Sploder12 May 28, 2025 13:50
@Sploder12
Copy link
Contributor

Nah, that doesn't count... That's a source guard -- protecting against double inclusion of a source file. This PR is header guards only...

I completely missed that was from a .cpp, interesting...

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Alright, thanks for this!

@xmkg xmkg added this pull request to the merge queue May 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 28, 2025
@sharder996 sharder996 added this pull request to the merge queue May 29, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 29, 2025
…ards-with-pragma-once

[cpp headers] replace header guards with #pragma once
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2025
@xmkg xmkg added this pull request to the merge queue May 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2025
@xmkg xmkg added this pull request to the merge queue May 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 30, 2025
@xmkg xmkg added this pull request to the merge queue May 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 30, 2025
@Sploder12 Sploder12 added this pull request to the merge queue May 31, 2025
@epicseven-cup
Copy link

I like this pr

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 31, 2025
@xmkg xmkg added this pull request to the merge queue May 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 31, 2025
@xmkg xmkg added this pull request to the merge queue May 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 31, 2025
@xmkg xmkg added this pull request to the merge queue May 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 31, 2025
@sharder996 sharder996 added this pull request to the merge queue Jun 1, 2025
Merged via the queue into main with commit 60a4a61 Jun 1, 2025
21 of 26 checks passed
@sharder996 sharder996 deleted the enhancement/replace-header-guards-with-pragma-once branch June 1, 2025 04:36
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.

6 participants