We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using allow_defined_top in the default luacheckrc causes unused global errors in .luacheckrc files.
allow_defined_top
%LOCALAPPDATA%/Luacheck/.luacheckrc:
allow_defined_top = true
Run:
luacheck %LOCALAPPDATA%/Luacheck/.luacheckrc
Get:
.luacheckrc:2:1: unused global variable 'allow_defined_top'
I guess allow_defined_top makes luacheck recognize all top-level defines as new globals instead of ignoring the ones already foudn in globals.
To solve this specific problem, I tried changing lua53\share\lua\5.3\luacheck\builtin_standards\init.lua:
builtin_standards.luacheckrc = { globals = { ... }, allow_defined_top = false, -- this doesn't work }
But no luck.
Add to your .luacheckrc files:
-- Above allow_defined_top breaks std.luacheck local luacheck = { std = 'luacheckrc', allow_defined_top = false, } files['**/.luacheckrc'] = luacheck
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using
allow_defined_top
in the default luacheckrc causes unused global errors in .luacheckrc files.%LOCALAPPDATA%/Luacheck/.luacheckrc:
Run:
luacheck %LOCALAPPDATA%/Luacheck/.luacheckrc
Get:
I guess allow_defined_top makes luacheck recognize all top-level defines as new globals instead of ignoring the ones already foudn in globals.
To solve this specific problem, I tried changing lua53\share\lua\5.3\luacheck\builtin_standards\init.lua:
But no luck.
Workaround
Add to your .luacheckrc files:
The text was updated successfully, but these errors were encountered: