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

Single control comment does not work in at least one edge case #963

Open
jlw opened this issue Nov 26, 2018 · 1 comment
Open

Single control comment does not work in at least one edge case #963

jlw opened this issue Nov 26, 2018 · 1 comment

Comments

@jlw
Copy link

jlw commented Nov 26, 2018

I have replicated a bug I saw in my own project in the test suite: master...jlw:defect/block-disable

In my project, I added a re-enabling control comment after to pass the linter, but that shouldn't be necessary.

My uneducated guess is that this is actually a parsing error rather than a bug in the control comment logic, but I'm not familiar enough with the scss-lint internals to go further at this time.

@jlw
Copy link
Author

jlw commented Nov 26, 2018

FYI, the test scenario failures I added are:

$ bundle exec rspec spec/scss_lint/linter_spec.rb
..........FF..FF.......................

Failures:

  1) SCSSLint::Linter control comments when a linter is disabled within a rule using a CSS function split over multiple lines should not report a lint on line 12
     Failure/Error: it { should_not report_lint line: 12 }
       expected that a lint would not be reported
     # ./spec/scss_lint/linter_spec.rb:150:in `block (5 levels) in <top (required)>'

  2) SCSSLint::Linter control comments when a linter is disabled within a rule using a CSS function split over multiple lines should not report a lint on line 13
     Failure/Error: it { should_not report_lint line: 13 }
       expected that a lint would not be reported
     # ./spec/scss_lint/linter_spec.rb:151:in `block (5 levels) in <top (required)>'

  3) SCSSLint::Linter control comments when a linter is disabled within a rule using a CSS function split over multiple lines and has no child rules should not report a lint on line 5
     Failure/Error: it { should_not report_lint line: 5 }
       expected that a lint would not be reported
     # ./spec/scss_lint/linter_spec.rb:175:in `block (6 levels) in <top (required)>'

  4) SCSSLint::Linter control comments when a linter is disabled within a rule using a CSS function split over multiple lines and has no child rules should not report a lint on line 6
     Failure/Error: it { should_not report_lint line: 6 }
       expected that a lint would not be reported
     # ./spec/scss_lint/linter_spec.rb:176:in `block (6 levels) in <top (required)>'

Finished in 0.08818 seconds (files took 0.28817 seconds to load)
39 examples, 4 failures

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

No branches or pull requests

1 participant