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

Add inherit_from as for rubocop.yml #72

Closed
Jerska opened this issue Apr 3, 2015 · 1 comment
Closed

Add inherit_from as for rubocop.yml #72

Jerska opened this issue Apr 3, 2015 · 1 comment
Labels

Comments

@Jerska
Copy link

Jerska commented Apr 3, 2015

Hi,

First, thanks a lot for this linter. It works flawlessly !
I have a feature request :
It would be really great to be able to configure haml-lint the same way rubocop does with inherit_from.
This would allow to have global overrides in ~/.haml-lint.yml and your local project overrides in ./haml-lint.yml.

Hope you will consider this !

Cheers !

@sds sds added the question label Apr 3, 2015
@sds
Copy link
Owner

sds commented Apr 3, 2015

Hey @jerskouille,

Glad to hear haml-lint has been serving you well. I've actually thought about implementing your request a long time ago, but when I tried to add support for the idea to Rubocop in rubocop/rubocop#583, it was pointed out to me that this isn't really a good idea. Allow me to explain.

I believe your intention with adding support to inherit_from ~/.haml-lint.yml is so you can DRY up your configurations so you aren't repeating the same configuration for all your repositories. However, if you think about it, the repository is the singular unit of composition—any configuration should never reference a file outside the repository, as that makes it inherently brittle. What happens if someone clones your repository and doesn't have the file in question?

For this reason, haml-lint was designed to only have a single file for configuration, located in the root of the repository. This way regardless of who clones your repository they will always have the intended configuration, with no additional work required on their part.

Hope that explains things. Keep sending us ways we can improve the tool!

@sds sds closed this as completed Apr 3, 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