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

colons "always" check fails #123

Closed
olegskl opened this issue Jul 6, 2015 · 4 comments
Closed

colons "always" check fails #123

olegskl opened this issue Jul 6, 2015 · 4 comments
Labels

Comments

@olegskl
Copy link

olegskl commented Jul 6, 2015

In Stylint version: 1.0.4 on OSX, Windows, ...
Given: "colons": {"expect": "always", "error": true},

We get:

Error: unecessary colon found
File: app/bundles/logged-site/logged-site.styl
Line: 2: background: yellow;

Most probably because starting from line 19 in checks/colons.js we have:

var arr = line.split( ' ' )
if (... && arr[0].indexOf( ':' ) === -1) { colon = false }

So:

var arr = '  background: yellow'.split( ' ' ) // ["", "", "background:", "red"]
// and colon becomes false

I think that the regression has appeared in 1bb2eee and there are no tests for untrimmed lines.

@olegskl olegskl changed the title colons check fails colons "always" check fails Jul 6, 2015
@rossPatton rossPatton added the bug label Jul 7, 2015
@rossPatton
Copy link
Collaborator

i had a utility function that trims the lines that i wasn't using. 1.0.6 should resolve this

@olegskl
Copy link
Author

olegskl commented Jul 7, 2015

Seems to be working in 1.0.6.

@rossPatton
Copy link
Collaborator

awesome, closing out...

@Alxblsk
Copy link

Alxblsk commented Jul 14, 2015

Hi

I found a weird issue with colon detection:

Code:
.smart-image-gallery {
.test2 {
display: flex;
flex-flow: column nowrap;
justify-content: space-between;
align-items: center;
}
}

Error:

Error: missing colon between property and value
File: src/gallery.styl
Line: 2: .test2 {

I found that if I rewrite '.smart-image-gallery' with just '.smart', I won't receive this error.
Could you take a look?

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

No branches or pull requests

3 participants