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

spaceBeforeBrace reports wrong column/line on multi-line selectors #231

Closed
jwilsson opened this issue Jul 30, 2016 · 3 comments
Closed

spaceBeforeBrace reports wrong column/line on multi-line selectors #231

jwilsson opened this issue Jul 30, 2016 · 3 comments

Comments

@jwilsson
Copy link
Member

Given this code:

.foo,
.bar  { // Note the two spaces
    color: red;
}

And this config:

{
    "spaceBeforeBrace": {
        "enabled": true,
        "style": "one_space"
    }
}

it gives the following report:

Warning: test.less: line 1, col 11, spaceBeforeBrace: Opening curly brace should be preceded by one space.

Which is clearly wrong.

@shellscape
Copy link
Contributor

Tricky, that. The selector technically does start on line 1. Do we want to report the line of the selector that owns the brace or the line the brace is on?

@jwilsson
Copy link
Member Author

Hmm, on one hand I'm thinking that we should try to report the exact position of the error. On the other hand, I started poking at it and it looks like it's quite a lot of work for something that's really edge casey.

@jwilsson
Copy link
Member Author

I'll take another look at this.

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

No branches or pull requests

2 participants