Skip to content

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

Open
@mehmet-cgh

Description

@mehmet-cgh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions