Skip to content

add GDScriptFormatterLinter - #154

Merged
kaste merged 2 commits into
SublimeLinter:masterfrom
Taffer:add-GDScriptFormatterLinter
Aug 8, 2026
Merged

kaste merged 2 commits into
SublimeLinter:masterfrom
Taffer:add-GDScriptFormatterLinter

Conversation

@Taffer

@Taffer Taffer commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Adds my SublimeLinter plugin that uses GDQuest's gdscript-formatter in lint mode for Godot's GDScript language.

I think I've done this right; let me know if the URL needs to be on GitHub, I've already set up a mirror since that's the case for the main PackageControl repo.

@kaste

kaste commented Aug 7, 2026

Copy link
Copy Markdown
Member

Hi!

  • Yeah, must be on a Hub we support, e.g. Github, gitlab, codeberg.
  • The main entry point should be called linter.py (not GDScriptFormatterLinter.py), t.i. a convention for automatic hot-reloading.
  • Personally, I would not add "linter" to the name of the linter, just more work to type, e.g. in the settings. (We don't do it elsewhere, "flake8-linter", "mypy-linter", ...) Either gdscriptformatter or even (because it's so long) gdscript-formatter. For the latter, you would need to use the name class attribute. Look at the console if SublimeLinter disagrees with the -, but I do think that is a valid char here.

Otherwise, looks good. 🌲

Taffer pushed a commit to Taffer/GDScript-formatter-linter that referenced this pull request Aug 8, 2026
@Taffer

Taffer commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed your excellent feedback:

  • Oh, nice, last time I did this codeberg wasn't an option. 👍 I'd already set up the GitHub mirror just in case.
  • Renamed entrypoint to linter.py
  • Renamed linter to gdscript-formatter and updated the README

The v1.0.3 tag should have the changes.

Cheers!

@kaste
kaste merged commit 63f64e9 into SublimeLinter:master Aug 8, 2026
1 check passed
@kaste

kaste commented Aug 8, 2026

Copy link
Copy Markdown
Member

Here we go; 🚢.

#apparently the regex set example was a lie

Is that something I need to fix in the docs?

    regex: tuple[str] = (
        r"^(?P<filename>.+?):",
        r"(?P<line>\d+):",
        r"(?P<code>[a-z\-]+):",
        r"(?P<error_type>[a-z]+): ",
        r"(?P<message>.+?(?P<near>'[^']+'){1}?.*)$",

is a tuple but in Python

    regex: str = (
        r"^(?P<filename>.+?):"
        r"(?P<line>\d+):"
        r"(?P<code>[a-z\-]+):"
        r"(?P<error_type>[a-z]+): "
        r"(?P<message>.+?(?P<near>'[^']+'){1}?.*)$"
     )

looks almost the same but is a str and auto concatenated, you don't need the + operator.

@Taffer

Taffer commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

No, you're good, I forgot you could put ( ... ) around multi-line strings like that and get a string out; I switched it to use \ and + in between, and ruff format switched it. But I forgot to update the commit message. 🤦

Thanks for looking after this, I appreciate the time you've put in. 👍

@Taffer
Taffer deleted the add-GDScriptFormatterLinter branch August 13, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants