Skip to content

fix: Restore lint icon functionality by adding a temporary dedicated gutter#206

Merged
NathanLovato merged 3 commits intoGDQuest:mainfrom
Orphaeus:patch-1
Mar 23, 2026
Merged

fix: Restore lint icon functionality by adding a temporary dedicated gutter#206
NathanLovato merged 3 commits intoGDQuest:mainfrom
Orphaeus:patch-1

Conversation

@Orphaeus
Copy link
Copy Markdown
Contributor

@Orphaeus Orphaeus commented Mar 13, 2026

Added an additional gutter to display lint icons without removing line numbers. This gutter is created upon lint if any issues exist, and removed if not.

I found #169 while experiencing the issue it discusses (disappearing line numbers upon lint), and I see that it was decided in 643e6bc to simply disable the lint icon functionality. I also saw Nathan's comment here:

I am in favor of (. . .) generally not trying to modify the script editor because I expect that we will have regressions over time and that is going to bring some maintenance burden.

and don't wish to argue with that assessment! I am simply uncertain how likely this PR is to add burden down the road, and wanted to offer a fix if others think it is viable.

I believe the modifications I made should be less likely to break things, since, unlike the original implementation, they don't override any existing editor functionality. Having icons to help locate issues identified by the linter is a great QoL feature, and I'd like to help preserve it if I can.

Please check if the PR fulfills these requirements:

  • The commit message follows our guidelines.
  • For bug fixes and features:
    • You tested the changes.

Related issue (if applicable): #169

What kind of change does this PR introduce?
Small visual/behavioral adjustment to restore disabled functionality.

Does this PR introduce a breaking change?
Not to my knowledge.

New feature or change

What is the current behavior?
The version of the plugin found in the asset library (0.16.1) removes line numbers from files when the linter is run. The functionality that caused this (applying icons to the lines where issues are found) was disabled last month in 643e6bc.

What is the new behavior?
This restores the use of icons to mark linter issues, but does so in a way that does not override any existing editor functionality. If any issues are found when the linter is run, a new gutter is created at index 2 and used to display the icons. The next time the linter is run, if there are no issues, the gutter is removed.

Other information
When removing the gutter, every gutter is checked to see if it has the name "lint_icon_gutter", rather than assuming that the desired gutter is found at index LINT_ICON_GUTTER. This is to prevent conflicts in case other addons have also added gutters.

Added an additional gutter at index 2 to display lint icons without removing line numbers.
@NathanLovato
Copy link
Copy Markdown
Contributor

NathanLovato commented Mar 23, 2026

Thank you very much, both for the contribution and your patience! I'm just getting to reviewing this, I'll test right away.

@NathanLovato
Copy link
Copy Markdown
Contributor

NathanLovato commented Mar 23, 2026

Okay I went ahead and made it so the gutter doesn't get removed on every run. Once a user used the linter on a script, the gutter is created and never removed. The gutter was also not accounting for editor scale, that's also fixed

@NathanLovato NathanLovato merged commit f8b3c5b into GDQuest:main Mar 23, 2026
@NathanLovato
Copy link
Copy Markdown
Contributor

Thanks for the contribution!

@Orphaeus
Copy link
Copy Markdown
Contributor Author

Orphaeus commented Mar 23, 2026

Glad I could help! Thanks for the clean-up adjustments.

@Orphaeus Orphaeus deleted the patch-1 branch March 23, 2026 15:30
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

Successfully merging this pull request may close these issues.

2 participants