You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
595 B
Lua
28 lines
595 B
Lua
2 years ago
|
local h = require("null-ls.helpers")
|
||
|
local methods = require("null-ls.methods")
|
||
|
|
||
|
local FORMATTING = methods.internal.FORMATTING
|
||
|
|
||
|
return h.make_builtin({
|
||
|
name = "rubocop",
|
||
|
meta = {
|
||
|
url = "https://github.com/rubocop/rubocop",
|
||
|
description = "Ruby static code analyzer and formatter, based on the community Ruby style guide.",
|
||
|
},
|
||
|
method = FORMATTING,
|
||
|
filetypes = { "ruby" },
|
||
|
generator_opts = {
|
||
|
command = "rubocop",
|
||
|
args = {
|
||
|
"--auto-correct",
|
||
|
"-f",
|
||
|
"quiet",
|
||
|
"--stdin",
|
||
|
"$FILENAME",
|
||
|
},
|
||
|
to_stdin = true,
|
||
|
-- from_stderr = true,
|
||
|
},
|
||
|
factory = h.formatter_factory,
|
||
|
})
|