Skip to content

Shows wrong errors for HAML files #72

Open
@palexvs

Description

@palexvs

I created a simple correct test HAML file in my rails project test.html.haml:

%div
  - if true
    %b A
  - else
    %b B

but SublimeLinter highlights errors:
image

test.html.haml:
 2:4  error  ruby:syntax error  unexpected end-of-input, expecting then or ';' or '\n'
 4:5  error  ruby:syntax error  unexpected else

My config file:

{
  "debug": true,
  "styles": [
    {
      "mark_style": "stippled_underline",
      "priority": 1,
      "scope": "source.ruby.rails keyword.control.ruby",
      "icon": "pointer",
      "types": [
        "warning"
      ]
    }
  ],
  "linters": {
    "rubocop": {
      "use_bundle_exec": true,
      "executable": "/Users/user/.rbenv/shims/rubocop"
    }
  }
}

If I run Rubocop manually I get no errors:

→ /Users/user/.rbenv/shims/rubocop test.html.haml 
Inspecting 0 files


0 files inspected, no offenses detected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions