godot-gdscript-toolkit icon indicating copy to clipboard operation
godot-gdscript-toolkit copied to clipboard

Expose `excluded_directories` to `gdformat` and document the usage in both - linter and formatter

Open dolanmiu opened this issue 2 years ago • 9 comments

pylint has this feature with --ignore-patterns

Does gdlint have something similar?

i have installed Godot addons, and I want to exclude this from linting

dolanmiu avatar Nov 21 '23 03:11 dolanmiu

Found it

excluded_directories: !!set
  .git: null
  addons: null

dolanmiu avatar Nov 21 '23 03:11 dolanmiu

Is this documented anywhere?

Also, does this work for gdformat or only for gdlint?

chrisl8 avatar Nov 22 '23 21:11 chrisl8

Is this documented anywhere?

Also, does this work for gdformat or only for gdlint?

I've checked and it does not work for gdformat (although it internally uses it and sets .git). Let's reopen and use this issue to bring it to gdformat as well as improving wiki/help pages.

Scony avatar Nov 23 '23 20:11 Scony

Not documented, searched through the source code to find it

dolanmiu avatar Nov 26 '23 21:11 dolanmiu

This would be a nice feature add.

Currently for my GitHub actions run, I can add the addons folder to gdlintrc and then use gdlint ., but for gdformat I have to use gdformat --check $(find . -name '*.gd' -not -path "./addons/*") to avoid including the addons folder.

    - id: run-gdformat
      run: gdformat --check $(find . -name '*.gd' -not -path "./addons/*")
    
    - id: run-gdlint
      run: gdlint .

Having gdformat also read the gdlintrc file or a similar file would allow me to use a generic GitHub action file, along with simplifying its use elsewhere in my workflow.

chrisl8 avatar Dec 10 '23 17:12 chrisl8

I believe this is now accomplished by #286

What is left is to document it. I'm not sure how to edit the Wiki though.
Either I don't have permission or I just don't know how.

chrisl8 avatar Mar 09 '24 22:03 chrisl8

@chrisl8 you can't clone https://github.com/Scony/godot-gdscript-toolkit.wiki.git ?

Scony avatar Mar 10 '24 18:03 Scony

@chrisl8 you can't clone https://github.com/Scony/godot-gdscript-toolkit.wiki.git ?

@Scony Yes, I can clone it, but I am not aware of any way to fork it and/or to make pull requests against it.

chrisl8 avatar Mar 10 '24 21:03 chrisl8

@chrisl8 you can't clone https://github.com/Scony/godot-gdscript-toolkit.wiki.git ?

@Scony Yes, I can clone it, but I am not aware of any way to fork it and/or to make pull requests against it.

I confirm it's not possible to open PR for wiki. Well, let me carry the update myself then.

Scony avatar Mar 12 '24 08:03 Scony