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

RuboCop warning Style/EmptyElse for :css only #68

Closed
michsch opened this issue Mar 10, 2015 · 1 comment
Closed

RuboCop warning Style/EmptyElse for :css only #68

michsch opened this issue Mar 10, 2015 · 1 comment
Labels

Comments

@michsch
Copy link

michsch commented Mar 10, 2015

If i use conditions containing only CSS, i got the following warning:

[W] RuboCop: Style/EmptyElse: Redundant empty `else`-clause.
- if Rails.env == 'development'
  :css
    .jw-non-functional {
      box-shadow: 0 0 6px 4px rgba(255, 127, 80, .6);
    }
- else
  :css
    .jw-non-functional {
      display: none;
    }

I've created a gist: https://gist.github.com/michsch/c876a01e576fb7e1de63

Expected result: no warning
Current result: [W] RuboCop: Style/EmptyElse: Redundant empty else-clause.

Our work around at the moment in haml-lint.yml:

  RuboCop:
    ignored_cops:
      - Style/EmptyElse
@sds sds added the bug label Mar 11, 2015
@sds
Copy link
Owner

sds commented Mar 11, 2015

Thanks for the report, @michsch!

Fixed in ee07324.

@sds sds closed this as completed Mar 11, 2015
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

2 participants