-
Notifications
You must be signed in to change notification settings - Fork 40
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
Shows wrong errors for HAML files #72
Comments
Well that looks like rubocop can lint haml files directly because that's what you do on the command line. Interestingly we explicitly exclude haml portions here in the plugin. Look here SublimeLinter-rubocop/linter.py Line 27 in 9bf25c7
You can change the selector in the settings though. Maybe "source.ruby, text.haml". Do you think this is wrong here from the beginning, or has rubocop changed? |
I tried to set
Tried to say, I have not used HAML for a while and just now tried to migrate on it but this issue blocks me |
Sorry, my mistake. If I set
|
I reread your initial post. On the command line you tell it to lint the haml file but it reports 0 files inspected. So it basically ignores the file. Probably worth it to look at the rubocop repo and even open an issue if this is somehow possible. |
In command-line Rubocop returns 0 errors but SublimeLinter returns 2 |
Yeah sure, but it looks like it actually ignores the file. For that, you could set "exclude" to maybe "*.haml" in the settings. The question is if we can somehow lint haml files. |
If Rubocop ignores this file then what has generated these errors |
The default selector explicitly extracts parts of the haml file, the Ruby parts, and sends them separately to rubocop. It does not send the whole file. I don't know if that makes a lot of sense but it's how it's done here. Maybe a selector "source.ruby - text.haml source.ruby" was actually intended although I'm not 100% sure about the selector semantics from top of my head. |
My current config
I have installed |
Adding Current config:
|
+1 I tried this with @palexvs config above but am still seeing the errors |
Well, generally the @palexvs overrides this selector which is probably not what you want. Also the |
I created a simple correct test HAML file in my rails project
test.html.haml
:but SublimeLinter highlights errors:
My config file:
If I run Rubocop manually I get no errors:
The text was updated successfully, but these errors were encountered: