Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space-before-paren returning incorrect column #151

Open
ChildishGiant opened this issue Nov 8, 2021 · 3 comments
Open

space-before-paren returning incorrect column #151

ChildishGiant opened this issue Nov 8, 2021 · 3 comments

Comments

@ChildishGiant
Copy link

This issue was found in #146 (comment) 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
@dar5hak
Copy link
Contributor

dar5hak commented Nov 21, 2021

This is the code causing this:

vala-lint/lib/Utils.vala

Lines 91 to 93 in 2db0180

if (line_count == 0) {
column += reference.column;
}

We are adding 1 to the column number if the error is on the first line (line_count == 0). I don't know why.

@ChildishGiant
Copy link
Author

Do @pantor or @jeremypw know why this is there?

@jeremypw
Copy link
Collaborator

Not sure why. These lines are from a @pantor commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants