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

WARN: Couldn't classify file tox.ini #44

Open
vmindru opened this issue Jan 23, 2018 · 2 comments
Open

WARN: Couldn't classify file tox.ini #44

vmindru opened this issue Jan 23, 2018 · 2 comments

Comments

@vmindru
Copy link
Contributor

vmindru commented Jan 23, 2018

Regarding "WARN: Couldn't classify file", quick look at
candidate = classify(filename) and classify function make's me understand that if a file is not classified in the classify it's determined as None , as result ansible-review will always return a WARN for such files.

Should it have a mechanism to provide FILE we can ignore. Path ignore mechanism already exists for ansible-lint, i think ansible-review should use similar approach or use the existing config.

@vmindru
Copy link
Contributor Author

vmindru commented Jan 23, 2018

as alternative simply change the warn to info.

diff --git a/lib/ansiblereview/__main__.py b/lib/ansiblereview/__main__.py
index c04f077..42b849d 100755
--- a/lib/ansiblereview/__main__.py
+++ b/lib/ansiblereview/__main__.py
@@ -94,5 +94,5 @@ def main():
                 info("Reviewing all of %s" % candidate, options)
             errors = errors + candidate.review(options, lines)
         else:
-            warn("Couldn't classify file %s" % filename, options)
+            info("Couldn't classify file %s" % filename, options)
     return errors

@vmindru
Copy link
Contributor Author

vmindru commented Jan 23, 2018

@willthames let me know your opinion on this one, i Would go with change of the error to INFO it should not be a problem to have "alien" files in one's repo enforcing those to be "somehow" classified or "excluded" seems like too much hassle.

vmindru pushed a commit to vmindru/ansible-review that referenced this issue Jan 23, 2018
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

1 participant