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

Added ignore capability. #564

Merged
merged 1 commit into from Feb 16, 2016
Merged

Added ignore capability. #564

merged 1 commit into from Feb 16, 2016

Conversation

cwygoda
Copy link

@cwygoda cwygoda commented Jan 8, 2015

Comments /* csslint ignore:start / and / csslint ignore:stop */
will exclude the lines in between. Linting is still done, but any
errors are not reported.

This aims to fix #558.

This is still missing tests and docs. As I am on the road for the next couple of days I still wanted to provide what's been done so far. Comments welcome.

@cwygoda
Copy link
Author

cwygoda commented Jan 11, 2015

I added tests for the enhancements to CSSLint and Reporter and actually changed/fixed some stuff uncovered by the tests. Please review critically and consider for merging.

@cwygoda
Copy link
Author

cwygoda commented Jan 21, 2015

Anything I can do to make this get merged?

@tschwartz
Copy link

It would really be awesome to get this new feature!

@Xaviju
Copy link

Xaviju commented Apr 9, 2015

+1! Please merge!

@lukasoppermann
Copy link
Contributor

👍 please merge this, having resets/normalizer is very common and should not lead to css linting problems.

@simison
Copy link

simison commented Apr 19, 2015

Yeah! +1

@lorenz068
Copy link

Can you merge this feature and release!
Please :)

@aharris
Copy link

aharris commented May 18, 2015

👍

ignoreStart = lineno;
}

if(line.match(/\/\*[ \t]*csslint[ \t]+ignore:stop[ \t]*\*\//i)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, but I usually think of these as start/end, not start/stop. (So, more declarative, less imperative… ;)

@bwinton
Copy link

bwinton commented Jun 12, 2015

How hard would it be to not run the rule in the ignore blocks?

Would the order-alphabetical fail if you have something like:

li {
  z-index: 2;
  /* csslint ignore:start */
  color: red;
}
/* csslint ignore:stop */

or:

/* csslint ignore:start */
li {
  z-index: 2;
  /* csslint ignore:stop */
  color: red;
}

or:

li {
  box-shadow: none;
  /* csslint ignore:start */
  z-index: 2;
  /* csslint ignore:stop */
  color: red;
}

?

@frvge
Copy link
Contributor

frvge commented Jan 10, 2016

Please rebase and squash. Feature looks good to me. @bwinton , let's try to get this out there first. Your suggestion is maybe better suited for a new feature request, that may or may not be combined with this PR.

@cwygoda
Copy link
Author

cwygoda commented Jan 11, 2016

Actually changed to ignore:end. One year later, this makes more sense to me also...

@smcauliffe
Copy link

Any chance this could get merged soon? It would be very helpful.

@frvge
Copy link
Contributor

frvge commented Jan 13, 2016

👍 Changeset looks good to me. Tested on a locally merged version. Can you add documentation? https://github.com/CSSLint/csslint/wiki/

@frvge frvge added this to the 1.0.0 milestone Jan 13, 2016
@cwygoda
Copy link
Author

cwygoda commented Jan 14, 2016

Added a small page with simple example: https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting
Did not yet add to wiki homepage while unreleased.

@frvge
Copy link
Contributor

frvge commented Feb 9, 2016

@cwygoda Can you please rebase?

@frvge
Copy link
Contributor

frvge commented Feb 15, 2016

@cwygoda Can you please rebase?

Comments /* csslint ignore:start */ and /* csslint ignore:end */
will exclude the lines in between. Linting is still done, but any
errors are not reported.

This aims to fix #558.
@cwygoda
Copy link
Author

cwygoda commented Feb 16, 2016

Done.

frvge added a commit that referenced this pull request Feb 16, 2016
@frvge frvge merged commit 2100e95 into CSSLint:master Feb 16, 2016
@frvge
Copy link
Contributor

frvge commented Feb 16, 2016

I added some words on it on the main wiki page. Thanks for your contribution.

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

Successfully merging this pull request may close these issues.

Enable ignore:start and ignore:end comments to exclude arbitrary CSS from linting
10 participants