postcss / sugarss

Indent-based CSS syntax for PostCSS
MIT License
707 stars 39 forks source link

Human readable error report on missing space after colon #23

Closed priezz closed 8 years ago

priezz commented 8 years ago

Currently i have message like that:

index.css: Cannot call method 'slice' of undefined

while index.css contains the only line:

@import "./imports/styles/main";

And actually there is a missing colon after a property in main.styl.

It would be nice to have the message, which reports about the missing colon and shows the correct file and line number.

ai commented 8 years ago

Show smallest input example to reproduce issue.

Because, right now missed colon should generates a selector, not a error.

priezz commented 8 years ago

My bad, it seems to be something different... I can't reproduce the behavior with missing colon. However, here is the example of main.styl, which results with a described above error:

.navigation
    left:0                   // <<< no space after colon
    top: 0

I assume, that lexemes are spitted by space, which is missing in this case.

ai commented 8 years ago
.navigation
    left:0                   // <<< no space after colon
    top: 0

Don’t generate error, only expected output. I agree that we should generate some error message. But I have no time for it right now. PR is welcome :).

priezz commented 8 years ago

@ai well... But why have you closed an issue? Please keep it opened until someone fixes it.

ai commented 8 years ago

Because this issues is TODO for me ;)

priezz commented 8 years ago

Nobody will send a PR for the closed issue. It is reasonable to keep it opened with "PR needed" or similar. Otherwise, you just close issues that you are not willing to do, what is the purpose of tracker in this case?

ai commented 8 years ago

@priezz c’om nobody will send a PR for this issue. It will be a dead issue in tracker. And I want to have things clean.

If you care about this feature, send PR.