vala-lint
vala-lint copied to clipboard
space-before-paren returning incorrect column
This issue was found in https://github.com/vala-lang/vala-lint/pull/146#issuecomment-930781422 but I thought I'd file it separately. The following code should have the same column for each error but the first one always returns off by one.
func1()
func2()
func3()
Output:
1.6 error Expected space before paren space-before-paren
2.5 error Expected space before paren space-before-paren
3.5 error Expected space before paren space-before-paren
This is the code causing this:
https://github.com/vala-lang/vala-lint/blob/2db018056befba76136e6c69a78d905a128a6165/lib/Utils.vala#L91-L93
We are adding 1 to the column number if the error is on the first line (line_count == 0
). I don't know why.
Do @pantor or @jeremypw know why this is there?
Not sure why. These lines are from a @pantor commit.