Linters for https://github.com/rxi/lite
- linter_ameba - Uses ameba for crystal files
- linter_dscanner - Uses dscanner for d files
- linter_eslint - Uses eslint for javascript files
- linter_flake8 - Uses flake8 for python files
- linter_gocompiler - Uses the go vet command to display compilation errors in golang files
- linter_golint - Uses golint for golang files
- linter_luacheck - Uses luacheck for lua files
- linter_standard - Uses standard linter for javascript files
Example of linting a file.
- To install any linter first copy the
linter.lua
file to the folderdata/plugins/
of the lite editor which has the needed foundation for the linters. - Copy the specific linters you want to use to the same folder.
- Make sure you have the commands needed for each linter to use them.
- If you want to configure options in some of the linters you can edit you
data/user/init.lua
local config = require "core.config"
local insert = table.insert
-- [[ Each linter will load the arguments from a table in config.<linter_name>_args ]]
-- Mark global as known to the linter
insert(config.luacheck_args, "--new-globals=love")
-- Add error reporting in fuctions which exceed cyclomatic complexity
insert(config.luacheck_args, "--max-cyclomatic-complexity=4")
-- Add warnings if lines pass a maximum length
insert(config.luacheck_args, "--max-line-length=80")