FPtje / GLuaFixer

Linter for Garry's mod Lua.
https://fptje.github.io/glualint-web/
GNU Lesser General Public License v2.1
141 stars 19 forks source link

The version 1.25.0 is ignoring the lint_ignoreFiles setting for some reason. #161

Closed AMD-NICK closed 1 year ago

AMD-NICK commented 1 year ago

screenshot_2023-07-04_09 25 02@2x

Steps to reproduce:

mkdir test-glualint && cd test-glualint
git clone https://github.com/TRIGONIM/ggram.git && cd ggram
curl -o glualint.zip -L https://github.com/FPtje/GLuaFixer/releases/download/1.25.0/glualint-1.25.0-x86_64-linux.zip
unzip glualint.zip
./glualint lua

cat .glualint.json
FPtje commented 1 year ago

Which glualint version were you using before 1.25.0? I remember changing something in the ignore files reading in a version a while ago.

Could you also run glualint with the --debug flag and show the output? Thanks!

AMD-NICK commented 1 year ago

Before this, I was using version 1.21.0.

Below is a snippet of the debug output.

Options {optsConfigFile = Nothing, optsOverridden = OverriddenSettings {indentation = Nothing, outputFormat = Nothing}, optsCommand = Lint, optsFiles = UseFiles ["lua"], optsDebug = True}
...
IsDirectory /home/ubuntu/test-glualint/ggram/lua/ggram/includes/surprise/multipart.lua
SearchUpwardsForFile /home/ubuntu/test-glualint/ggram/lua/ggram/includes/surprise ["glualint.json",".glualint.json"]
GetHomeDirectory
FirstExists ["/home/ubuntu/.glualint.json","/home/ubuntu/glualint.json"]
ReadFile /home/ubuntu/test-glualint/ggram/.glualint.json
ReadFile lua/ggram/includes/surprise/multipart.lua
::warning file=lua/ggram/includes/surprise/multipart.lua,line=131,col=15,endLine=131,endColumn=59,title="Scope depth"::Are you Egyptian? What's with these fucking scope pyramids!?
lua/ggram/includes/surprise/multipart.lua: [Warning] line 131, column 15 - line 131, column 59: Are you Egyptian? What's with these fucking scope pyramids!?
::warning file=lua/ggram/includes/surprise/multipart.lua,line=321,col=22,endLine=321,endColumn=62,title="Syntax inconsistency"::Inconsistent use of 'single quoted strings' and 'double quoted strings'
lua/ggram/includes/surprise/multipart.lua: [Warning] line 321, column 22 - line 321, column 62: Inconsistent use of 'single quoted strings' and 'double quoted strings'
...
FPtje commented 1 year ago

Thanks! I think I know enough for now. The version that changed this is 1.22.0 with this commit: https://github.com/FPtje/GLuaFixer/commit/2564005fb8520b53cd96994ef08215bb41ff34e5

I'll look closer at it when I get the chance. Thanks for providing a reproducible example. This helps debugging!

FPtje commented 1 year ago

I just quickly tried to reproduce it. I can't on Linux. Looking at your screenshots, it appears that you're using a MacOS device. This may be a clue why it happens for you, but not me.

FPtje commented 1 year ago

Ah, it's not that. It looks like the difference is in the command you run. When you run glualint lint . it works, but when you run glualint lint lua it doesn't

FPtje commented 1 year ago

Fixed in the latest commit. Until that is released, you can run glualint lint . instead of glualint lint lua to get the desired behaviuor. Sorry for the inconvenience, and thanks for reporting!

AMD-NICK commented 1 year ago

Looking at your screenshots, it appears that you're using a MacOS device

By the way, I couldn't figure out how to make glualint work on MacOS, so I have to do linting on an Ubuntu server 😢

FPtje commented 1 year ago

Why is that, does the executable on the releases page not work? Do you use an ARM mac?

AMD-NICK commented 1 year ago

Yes, I have a MacBook with an M1 processor. I have already created an issue before:

https://github.com/FPtje/GLuaFixer/issues/115 https://github.com/FPtje/GLuaFixer/issues/119

Nothing has changed since then 😢