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

Fix header_guards.py so it detects the copyright header properly. #94652

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

shana
Copy link
Contributor

@shana shana commented Jul 23, 2024

Having hardcoded offsets is a problem if the copyright header ever changes or when running on forks with different copyright header formats. This looks for the Godot header and determines the offset based on it, or if there's no header, at the start of the file. The obj-c detection had to be tweaked, as there are dummy files that only have commented out code.

Contributed with ❤️ by W4Games

Having hardcoded offsets is a problem if the copyright header ever changes
or when running on forks with different copyright header formats.
@shana shana requested a review from a team as a code owner July 23, 2024 10:21
@AThousandShips AThousandShips added enhancement topic:buildsystem cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Jul 23, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone Jul 23, 2024
@AThousandShips AThousandShips added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Jul 23, 2024
@akien-mga akien-mga changed the title Fix header_guards so it detects the copyright header properly. Fix header_guards.py so it detects the copyright header properly. Jul 23, 2024
@akien-mga akien-mga added bug and removed enhancement cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Jul 23, 2024
@akien-mga akien-mga merged commit 18c1c25 into godotengine:master Jul 23, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@shana shana deleted the fix-header-guards branch July 23, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants