Skip to content

gdlint: add support to check blank spaces between variables and functions #367

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

Open
mehmet-cgh opened this issue Mar 25, 2025 · 0 comments

Comments

@mehmet-cgh
Copy link

According to the GDScript style guide, functions should be surrounded by two blank lines. Additionally, my team prefers having one blank line between variables. I've implemented these checks for both variables and functions, and they work well. I wanted to create an issue first to see if this is something we would like to have. If so, I will create a PR.

These checks will be included in the format_checks. The check for functions will be enabled by default, as defined in the GDScript style guide. The check for variables will be disabled by default but can be enabled if needed.

Implementation:

In the configuration file, we will define fields as integers.
For example: "blank-lines-for-functions": 2
For example: "blank-lines-for-vars": 1

In the code, we will check functions and variables to ensure there is enough blank space for both, as defined in the configuration file.

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

No branches or pull requests

1 participant