Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tetzng committed Sep 13, 2023
1 parent 692bb4d commit 62fc5fd
Showing 1 changed file with 44 additions and 11 deletions.
55 changes: 44 additions & 11 deletions test/linter/flake8_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('flake8', function()
[[def foo(n):]],
[[ if n == 0:]],
[[ return bar]],
[[print('too long sentence to be displayed in one line blah blah blah blah blah blah blah blah blah blah blah blah blah')]],
[[print("it's too long sentence to be displayed in one line, blah blah blah blah")]],
})
assert.are.same({
{
Expand All @@ -37,8 +37,30 @@ describe('flake8', function()
},
{
bufnr = 3,
col = 14,
end_col = 14,
col = 9,
end_col = 9,
end_lnum = 4,
lnum = 4,
message = 'indentation is not a multiple of 4 [111]',
namespace = 4,
severity = 1,
source = 'flake8',
},
{
bufnr = 3,
col = 9,
end_col = 9,
end_lnum = 4,
lnum = 4,
message = 'over-indented [117]',
namespace = 4,
severity = 1,
source = 'flake8',
},
{
bufnr = 3,
col = 15,
end_col = 15,
end_lnum = 4,
lnum = 4,
message = 'multiple spaces after keyword [271]',
Expand All @@ -48,8 +70,8 @@ describe('flake8', function()
},
{
bufnr = 3,
col = 16,
end_col = 16,
col = 17,
end_col = 17,
end_lnum = 4,
lnum = 4,
message = "undefined name 'bar' [821]",
Expand All @@ -59,13 +81,24 @@ describe('flake8', function()
},
{
bufnr = 3,
col = 19,
end_col = 19,
end_lnum = 4,
lnum = 4,
message = 'trailing whitespace [291]',
col = 0,
end_col = 0,
end_lnum = 5,
lnum = 5,
message = 'expected 2 blank lines after class or function definition, found 0 [305]',
namespace = 4,
severity = 2,
severity = 1,
source = 'flake8',
},
{
bufnr = 3,
col = 79,
end_col = 79,
end_lnum = 5,
lnum = 5,
message = 'line too long (80 > 79 characters) [501]',
namespace = 4,
severity = 1,
source = 'flake8',
},
}, diagnostics)
Expand Down

0 comments on commit 62fc5fd

Please sign in to comment.