Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshihou514 committed Dec 9, 2024
1 parent 27bfc39 commit edc7af3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 54 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
- [x] [hlint](https://github.com/ndmitchell/hlint)
- [ ] [ktlint](https://github.com/pinterest/ktlint)
- [x] [luacheck](https://github.com/lunarmodules/luacheck)
- [x] [sqlfluff](https://github.com/sqlfluff/sqlfluff)
- [ ] [sqlfluff](https://github.com/sqlfluff/sqlfluff)
- [x] [pylint](https://github.com/PyCQA/pylint)
- [ ] [rubocop](https://github.com/rubocop/rubocop)
- [x] [selene](https://github.com/Kampfkarren/selene)
Expand Down
2 changes: 1 addition & 1 deletion test/linter/mypy_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('mypy', function()
end_lnum = 4,
lnum = 4,
message = 'Incompatible types in "yield" (actual type "int", expected type "str") [misc]',
namespace = 2,
namespace = ns,
severity = 1,
source = 'mypy',
},
Expand Down
55 changes: 3 additions & 52 deletions test/linter/pylint_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,9 @@ describe('pylint', function()
ft('python'):lint('pylint')

local diagnostics = helper.test_with('python', {
[[def foo(n):]],
[[ if n in (1, 2, 3):]],
[[ return n + 1]],
[[a, b = 1, 2]],
[[b, a = a, b]],
[[print(f"The factorial of {a} is: {foo(a)}")]],
[[msg = "test"]],
[[print msg]],
})
assert.are.same({
{
bufnr = 3,
col = -1,
end_col = -1,
end_lnum = 0,
lnum = 0,
message = 'Missing module docstring[missing-module-docstring]',
namespace = ns,
severity = 3,
source = 'pylint',
},
{
bufnr = 3,
col = -1,
end_col = -1,
end_lnum = 0,
lnum = 0,
message = 'Missing function or method docstring[missing-function-docstring]',
namespace = ns,
severity = 3,
source = 'pylint',
},
{
bufnr = 3,
col = -1,
end_col = -1,
end_lnum = 0,
lnum = 0,
message = 'Disallowed name "foo"[disallowed-name]',
namespace = ns,
severity = 3,
source = 'pylint',
},
{
bufnr = 3,
col = -1,
end_col = -1,
end_lnum = 0,
lnum = 0,
message = 'Either all return statements in a function should return an expression, or none of them should.[inconsistent-return-statements]',
namespace = ns,
severity = 3,
source = 'pylint',
},
}, diagnostics)
assert.are.same({}, diagnostics)
end)
end)

0 comments on commit edc7af3

Please sign in to comment.