Scony / godot-gdscript-toolkit

Independent set of GDScript tools - parser, linter, formatter, and more
MIT License
944 stars 65 forks source link

`gdlint` do not report trailing spaces #272

Closed MikeSchulze closed 7 months ago

MikeSchulze commented 7 months ago

I want to check for invalid trailing spaces like

func xx() -> void: 
   pass

It should detect an invalid trailing space func xx() -> void:

Scony commented 7 months ago

gdlint reports precisely that - what is that you have tried?

MikeSchulze commented 7 months ago

Hi, i just run glint on this example with latest master version.

When a row has a trailing space, it will not detect and reported.

Scony commented 7 months ago
$ cat > x.gd
func xx() -> void: 
   pass
$ gdlint x.gd 
x.gd:1: Error: Trailing whitespace(s) (trailing-whitespace)
Failure: 1 problem found

What OS do you use? Could you also upload the original file as an attachment?

MikeSchulze commented 7 months ago

I use Windows11 the GitBash. I will attach an example in the next few minutes.

Hm, strange, I am not able to reproduce it. I have restored the corresponding file but the error is found correctly, I have no idea why I got this error and it works now.

It was probably a hiccup, the ticket can be closed.