postcss/sugarss

Human readable error report on missing space after colon

priezz opened this issue · 7 comments

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

Show smallest input example to reproduce issue.

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

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
.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 :).

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

ai commented

Because this issues is TODO for me ;)

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

@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.