Skip to content

Commit

Permalink
fix(linters): INPUT in quotes, for spc in fs (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativenull authored Sep 4, 2023
1 parent b273ecd commit 42e2d1a
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/actionlint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'actionlint'
local command = string.format('%s -no-color -oneline -stdin-filename ${INPUT} -', fs.executable(linter))
local command = string.format('%s -no-color -oneline -stdin-filename "${INPUT}" -', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/ameba.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'ameba'
local command = string.format('%s --no-color --format flycheck ${INPUT}', fs.executable(linter))
local command = string.format('%s --no-color --format flycheck "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/clang_tidy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'clang-tidy'
local command = string.format('%s ${INPUT}', fs.executable(linter))
local command = string.format('%s "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/clazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local args = {
'--extra-arg=-Xclang',
'--extra-arg=-analyzer-output=text',
'--extra-arg=-fno-color-diagnostics',
'${INPUT}',
'"${INPUT}"',
}
local command = string.format('%s %s', fs.executable(linter), table.concat(args, ' '))

Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/codespell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'codespell'

local command = string.format('%s --disable-colors ${INPUT}', fs.executable(linter))
local command = string.format('%s --disable-colors "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/cppcheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'cppcheck'
local command = string.format(
'%s --quiet --force --enable=warning,style,performance,portability --error-exitcode=1 ${INPUT}',
'%s --quiet --force --enable=warning,style,performance,portability --error-exitcode=1 "${INPUT}"',
fs.executable(linter)
)

Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/cpplint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'cpplint'
local command = string.format('%s ${INPUT}', fs.executable(linter))
local command = string.format('%s "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/cspell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'cspell'

local command = string.format('%s --no-color --no-progress --no-summary ${INPUT}', fs.executable(linter))
local command = string.format('%s --no-color --no-progress --no-summary "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/dartanalyzer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'dartanalyzer'
local command = string.format('%s --format machine ${INPUT}', fs.executable(linter))
local command = string.format('%s --format machine "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/debride.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'debride'
local command = string.format('%s ${INPUT}', fs.executable(linter))
local command = string.format('%s "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/eslint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'eslint'
local bin = fs.executable(linter, fs.Scope.NODE)
local args = '--no-color --format visualstudio --stdin-filename ${INPUT} --stdin'
local args = '--no-color --format visualstudio --stdin-filename "${INPUT}" --stdin'
local command = string.format('%s %s', bin, args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/eslint_d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'eslint_d'
local bin = fs.executable(linter, fs.Scope.NODE)
local args = '--no-color --format visualstudio --stdin-filename ${INPUT} --stdin'
local args = '--no-color --format visualstudio --stdin-filename "${INPUT}" --stdin'
local command = string.format('%s %s', bin, args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/fecs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

local linter = 'fecs'
local bin = fs.executable(linter, fs.Scope.NODE)
local args = 'check --color=false --stream ${INPUT}'
local args = 'check --color=false --stream "${INPUT}"'
local command = string.format('%s %s', bin, args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/fish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

local fs = require('efmls-configs.fs')
local command = fs.executable('fish')
local lintCommand = string.format('%s --no-execute ${INPUT}', command)
local lintCommand = string.format('%s --no-execute "${INPUT}"', command)

return {
lintCommand = lintCommand,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/flawfinder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'flawfinder'
local command = string.format('%s --singleline --dataonly ${INPUT}', fs.executable(linter))
local command = string.format('%s --singleline --dataonly "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'gcc'
local args = { '-Wpedantic', '-Wall', '-Wextra', '-fno-diagnostics-color', '-fsyntax-only', '${INPUT}' }
local args = { '-Wpedantic', '-Wall', '-Wextra', '-fno-diagnostics-color', '-fsyntax-only', '"${INPUT}"' }
local command = string.format('%s %s', fs.executable(linter), table.concat(args, ' '))

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/golangci_lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'golangci-lint'
local command = string.format('%s run --color never --out-format tab ${INPUT}', fs.executable(linter))
local command = string.format('%s run --color never --out-format tab "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/mcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'mcs'
local command = string.format('%s -unsafe --parse ${INPUT}', fs.executable(linter))
local command = string.format('%s -unsafe --parse "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/perlcritic.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local fs = require('efmls-configs.fs')

local linter = 'perlcritic'
local command = string.format('%s --nocolor --verbose "%s" ${INPUT}', fs.executable(linter), [[%l:%c:%s %m [%p]\n]])
local command = string.format('%s --nocolor --verbose "%s" "${INPUT}"', fs.executable(linter), [[%l:%c:%s %m [%p]\n]])

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/phan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'phan'
local command = string.format('%s --output-mode pylint ${INPUT}', fs.executable(linter, fs.Scope.COMPOSER))
local command = string.format('%s --output-mode pylint "${INPUT}"', fs.executable(linter, fs.Scope.COMPOSER))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/phpstan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'phpstan'
local args = 'analyse --no-progress --no-ansi --error-format=raw ${INPUT}'
local args = 'analyse --no-progress --no-ansi --error-format=raw "${INPUT}"'
local command = string.format('%s %s', fs.executable(linter, fs.Scope.COMPOSER), args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/psalm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'psalm'
local args = '--no-progress --no-cache --output-format=emacs ${INPUT}'
local args = '--no-progress --no-cache --output-format=emacs "${INPUT}"'
local command = string.format('%s %s', fs.executable(linter, fs.Scope.COMPOSER), args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/pylint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'pylint'
local command = string.format('%s --score=no ${INPUT}', fs.executable(linter))
local command = string.format('%s --score=no "${INPUT}"', fs.executable(linter))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/reek.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local fs = require('efmls-configs.fs')

-- TODO: Not properly implemented yet
local linter = 'reek'
local args = 'exec reek --format txt --force-exclusion --stdin-filename ${INPUT}'
local args = 'exec reek --format txt --force-exclusion --stdin-filename "${INPUT}"'
local command = string.format('%s %s', fs.executable('bundle', fs.Scope.BUNDLE), args)

return {
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/rubocop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'rubocop'
local command = string.format('%s --lint --format emacs --stdin ${INPUT}', fs.executable(linter, fs.Scope.BUNDLE))
local command = string.format('%s --lint --format emacs --stdin "${INPUT}"', fs.executable(linter, fs.Scope.BUNDLE))

return {
prefix = linter,
Expand Down
2 changes: 1 addition & 1 deletion lua/efmls-configs/linters/slim_lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
local fs = require('efmls-configs.fs')

local linter = 'slim-lint'
local command = string.format('%s --stdin-file-path ${INPUT}', fs.executable(linter, fs.Scope.BUNDLE))
local command = string.format('%s --stdin-file-path "${INPUT}"', fs.executable(linter, fs.Scope.BUNDLE))

return {
prefix = linter,
Expand Down

0 comments on commit 42e2d1a

Please sign in to comment.