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

Manually set rubocop config #5

Closed
wants to merge 3 commits into from
Closed

Manually set rubocop config #5

wants to merge 3 commits into from

Conversation

elstgav
Copy link
Contributor

@elstgav elstgav commented May 12, 2015

I'm looking to add this option to support the SublimeLinter plugin I'm writing (see related issue). The main problem I've run into is that while editing your files, SublimeLinter will create a temporary copy to lint. Since the tmp file is in a separate directory, rubocop won't correctly determine the config location (the slim config, however, is manually set).

This would also allow users to keep a separate rubocop configuration for their slim files if they so choose. We may want to add an option to hardcode the rubocop config as well in slim-lint.yml.

Looking for guidance on the feasibility of this approach as well as how to properly test this feature. I would imagine it would be useful to integrate with other linters (e.g. jshint, scss-lint) for the other languages slim supports, so this approach may not be feasible as the number grows.

This enables the use of a separate rubocop config for your slim files,
and supports live-linting tools that lint files in temporary paths
@sds
Copy link
Owner

sds commented May 13, 2015

Hey @elstgav, thanks for your work in integrating slim-lint with Sublime.

We had a similar request in the haml-lint project, and my issue was that exposing this as a top-level command line flag seemed like overkill when you could easily isolate support for this to just the RuboCop linter via an environment variable. I didn't hear back that this wouldn't work, but it sounds like it would.

Would it be possible for you to restructure this to use an environment variable instead? (I'm not familiar with the SublimeLinter ecosystem).

On top of that, could you write a test that verifies the functionality? I'd like to maintain 100% code coverage for this project, and currently no test actually exercises the setting of the config file.

@elstgav
Copy link
Contributor Author

elstgav commented May 18, 2015

Good idea. I've been a bit busy, I hope to make some progress on it this week.

@elstgav
Copy link
Contributor Author

elstgav commented May 26, 2015

Reworked this in #6

@elstgav elstgav closed this May 26, 2015
@elstgav elstgav deleted the rubocop-config branch May 26, 2015 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants