SublimeLinter / SublimeLinter-haml-lint

SublimeLinter 3 plugin for Haml, using haml-lint.
MIT License
4 stars 8 forks source link

Issue with .rubocop.yml #2

Closed kamen-hursev closed 8 years ago

kamen-hursev commented 8 years ago

When using this plug-in the configuration file .rubocop.yml is not properly loaded. By default haml-lint looks for the .rubocop.yml in the current and parent directories, but this won't work when the linter creates the temporary file in /tmp/SublimeLinter3-....

Currently haml-lint relies on HAML_LINT_RUBOCOP_CONF ENV variable. Is there a way that a value for this variable can be passed to the the plugin without starting sublime like this: HAML_LINT_RUBOCOP_CONF=/some_path/.rubocop.yml subl?

jeroenj commented 8 years ago

I haven't been using Sublime Text for the past few years but I would think that there would be a way to do so.

Preferably there is a variable that points to the project root in Sublime Text. If that exists the plugin could set something like #{project_root}/.rubocop.yml.

Feel free to track it down and create an MR. I'd be happy to merge it. :)

kamen-hursev commented 8 years ago

There is a setting token ${project}, but I don't see a way to set environment variable from a linter. I don't know, it might be easier for haml-lint to accept an argument like --rubocop-config.