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

Enhancement: Enable default config file when parsing similar to other linters #103

Closed
sdurette opened this issue Oct 13, 2015 · 4 comments
Closed

Comments

@sdurette
Copy link

If possible add the ability to use a default config file when parsing the current directory and subdirectories. Ideally it would be able to look through the directory chain and find the file in the current directory or any directory above and apply it. Other linters such as eslint and jslint use files such as .eslintrc and .jslintrc, so this could be a .cflintrc file. The other linters use json format.

This would be helpful working on a project basis as different rules can apply to different projects.

This would be an enhancement. I hope I can figure out how to flag it appropriately.

@sdurette sdurette changed the title Enable default config file when parsing similar to other linters Enhancement: Enable default config file when parsing similar to other linters Oct 13, 2015
@jjames967
Copy link
Collaborator

JSON support is mentioned in #95. However, the naming convention would be good to use to match other linters. We also need to decide on the default linting rules to be ran. I suppose we could adapt rules from jsHint and a few from jscs (such as line length), combine them, and use those.

@ryaneberly
Copy link
Contributor

see related #195 for suppressing messages in the source.

However, I like the idea of folder specific configs.

ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 7, 2017
ryaneberly added a commit that referenced this issue Jan 8, 2017
support hierarchial configurations
ryaneberly added a commit that referenced this issue Jan 8, 2017
ryaneberly added a commit that referenced this issue Jan 17, 2017
ryaneberly added a commit that referenced this issue Feb 2, 2017
@ryaneberly
Copy link
Contributor

tco. The file name is .cflintrc

Examples:

{
  "includes" : [ {
    "code" : "FUNCTION_HINT_MISSING"
  } ],
  "inheritParent" : false,
  "inheritPlugins" : true
}

or

{
  "excludes" : [ {
    "code" : "FUNCTION_HINT_MISSING"
  } ],
  "inheritParent" : true,
  "inheritPlugins" : true
}

@ryaneberly
Copy link
Contributor

note: only the xml version works in RC1.
.cflintrc.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants