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

Support per-project style files #51

Closed
mivok opened this issue Aug 15, 2014 · 4 comments
Closed

Support per-project style files #51

mivok opened this issue Aug 15, 2014 · 4 comments
Labels
enhancement New feature or request

Comments

@mivok
Copy link
Collaborator

mivok commented Aug 15, 2014

Rubocop supports .rubocop.yml files inside a project dir (and parent dirs). We should support the same thing to allow projects to set their own style. In addition, we need to come up with a nice way to include other styles - both relative to the current style file and relative to the built in styles.

@mjankowski
Copy link
Contributor

Is it currently possible to specify for mdl to use a style file which is NOT provided by the project itself, but provided by the user/project? This wasn't obvious to me, but it'd be great to be able to use it.

We'd like to use mdl in a CI environment to format check markdown ... but we will consistently violate several of the rules because of the way our page processing works (there will never be an h1 in the markdown, for example, so we want to ignore MD002.

@mivok
Copy link
Collaborator Author

mivok commented Jan 23, 2015

Yes, you can specify a path name or filename, and mdl will look where you specify rather than in its own style location:

mdl -s ./path/to/style.rb

The current rule is: if the filename has .rb at the end, or there is a / in the name, then treat it as a filename/pathname rather than a built in style.

@mjankowski
Copy link
Contributor

Thanks, makes sense: #65

I like the idea of supporting some logic like:

  • First look in the project for an .mdlrc with rules
  • Then look in ~/.mdlrc for rules
  • If neither exist, use default
  • An -s overrides any of those

@mivok
Copy link
Collaborator Author

mivok commented Nov 15, 2015

Fixed in #111

@mivok mivok closed this as completed Nov 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants