luac — The luac program parses lua files. It can be used for detecting errors in lua code. See http://www.lua.org/manual/4.0/luac.html for more informations about luac.
This package will lint your .lua
opened files in Atom using a script to find globals. It will lint on edit and/or save, so you'll see instantly if your code has globals you may not be expecting.
The script provided was created originally by Mikk and has been modified to work as a linter.
The following directives in the file turn certain features off in the detection
-- GLOBALS: SomeGlobal, SomeOtherGlobal
- The script will never complain about these. There may be multiple lines of these anywhere in the file, taking effect globally (for now). There is no way to un-GLOBAL an already declared global.
-- SETGLOBALFILE [ON/OFF]
- Enable/disable
SETGLOBAL
checks in the global scope- Default: ON
-- SETGLOBALFUNC [ON/OFF]
- Enable/disable
SETGLOBAL
checks in functions. This setting affects the whole file.- Default: ON
-- GETGLOBALFILE [ON/OFF]
- Enable/disable
GETGLOBAL
checks in functions. This setting affects the whole file.- Default: OFF
-- GETGLOBALFUNC [ON/OFF]
- Enable/disable
GETGLOBAL
checks in functions. This setting affects the whole file.- Default: ON
GETGLOBAL
occurrences will be marked as warningsSETGLOBAL
occurrences will be marked as errors
Before using this package, you must ensure that lua
and luac
are installed on your system.
$ apm install linter
(if you don't have AtomLinter/Linter installed).$ apm install linter-lua-globals
- linter-lua, - Linter plugin for lua, using
luac -p
- linter-php, for PHP using
php -l
- linter-phpcs - Linter plugin for PHP, using phpcs.
- linter-phpmd - Linter plugin for PHP, using phpmd.
- linter-jshint - Linter plugin for JavaScript, using jshint.
- linter-scss-lint - Sass Linter plugin for SCSS, using scss-lint.
- linter-coffeelint Linter plugin for CoffeeScript, using coffeelint.
- linter-csslint Linter plugin for CSS, using csslint.
- linter-rubocop - Linter plugin for Ruby, using rubocop.
- linter-tslint Linter plugin for JavaScript, using tslint.