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

Print informative errors when configuration YAML contains unused information #120

Closed
keith opened this issue Sep 3, 2015 · 6 comments
Closed
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@keith
Copy link
Collaborator

keith commented Sep 3, 2015

Not sure this is worth fixing, but I wanted to bring it up.

If you make a config file like:

included: Classes

Instead of:

included:
  - Classes

SwiftLint will silently ignore the first one. Typically I think this performs the same way in yaml, but regardless it might be nice to add errors for cases where the configuration isn't what we'd expect. The only reason I noticed this is because of the large number of files being linted.

@jpsim
Copy link
Collaborator

jpsim commented Sep 3, 2015

I'd absolutely love to do more error handling wrt yaml files, but haven't yet found an elegant way to do that.

@sboc
Copy link

sboc commented Sep 23, 2015

Where do I put .swiftlint.yml btw? I cannot get this to work at all. Where do I run swiftlint from?

@dpassage
Copy link
Contributor

It looks like .swiftlint.yml doesn't work with the latest released version 0.1.2; I got it to work by checking out master and building it myself.

SwiftLint team, would love to get the config file support released! Great tool so far.

@jpsim
Copy link
Collaborator

jpsim commented Sep 23, 2015

SwiftLint team, would love to get the config file support released! Great tool so far.

Homebrew literally just yesterday started accepting formulas requiring Xcode 7, so we haven't been able to release until now. We'll be releasing shortly.

@dpassage
Copy link
Contributor

Hooray! Thanks @jpsim !

@jpsim jpsim added the enhancement Ideas for improvements of existing features and rules. label Nov 18, 2015
@jpsim jpsim changed the title Silent configuration error Print informative errors when configuration YAML contains unused information Nov 18, 2015
@jpsim
Copy link
Collaborator

jpsim commented Feb 8, 2016

Many improvements to YAML error reporting were just merged in #498.

@jpsim jpsim closed this as completed Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

4 participants