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

Style: Consolidate & migrate GDScript .editorconfig #96965

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Sep 13, 2024

The above PR introduced an issue where running GDScript tests will create a .editorconfig file in modules/gdscript/tests/scripts/. While it could be added as an ignored item in the local .gitignore, the generated file defines root = true, so all other config options would be erroneously discarded.

This fixes the issue by making use of the new intended behavior: a pre-existing .editorconfig. While a blank file would work, it felt much more appropriate to coincide this a minor style cleanup of the .editorconfig files already in the GDScript module. So now, rather than going from 2→3 files, we're going from 2→1, as all the relevant attributes can be safely handled in a single file (only .gd/.out were given attributes, and they're exclusively found in the test project itself).

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

Can confirm that this prevents that issue, can't speak to the exact contents of the files but this works

@dalexeev
Copy link
Member

Note that *.gd files are located not only in modules/gdscript/tests/scripts/, but also in modules/gdscript/editor/script_templates/.

@Repiteo Repiteo force-pushed the style/gdscript-editorconfig branch from 06e83a2 to 5e36b71 Compare September 13, 2024 15:45
@Repiteo
Copy link
Contributor Author

Repiteo commented Sep 13, 2024

Oop, so they are! I'll keep the module root .editorconfig in that case, so this is now effectively migrating the …/scripts/parser/ config to …/scripts/.

• Moved to test project root so a new `.editorconfig` isn't constantly generated.
• Disable attributes only in the files which use invalid syntax deliberately
@Repiteo Repiteo force-pushed the style/gdscript-editorconfig branch from 5e36b71 to bf811db Compare September 13, 2024 16:12
@akien-mga akien-mga merged commit 4106648 into godotengine:master Sep 16, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Repiteo Repiteo deleted the style/gdscript-editorconfig branch September 16, 2024 13:26
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