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 hook: recipe linting #141

Merged
merged 21 commits into from Dec 5, 2019
Merged

Add hook: recipe linting #141

merged 21 commits into from Dec 5, 2019

Conversation

jgsogo
Copy link
Contributor

@jgsogo jgsogo commented Nov 29, 2019

Add hook to lint recipes. It should substitute Conan built-in (conan-io/conan#6152)

Not to be merged before conan-io/conan#6152, it might require additional requirements in this repo.

  • Test test_dynamic_fields should only run with the conans.pylint_plugin.py with the python_requires added.

@uilianries
Copy link
Member

Should we include it to Conan Center? As linter was embedded in Conan, all recipes were checked by pylint before.

@jgsogo
Copy link
Contributor Author

jgsogo commented Nov 29, 2019

It can be useful for Conan Center too, of course.

@jgsogo jgsogo self-assigned this Dec 2, 2019
@jgsogo jgsogo changed the title Add recipe linting Add hook: recipe linting Dec 2, 2019
@uilianries
Copy link
Member

Please, don't forget to add it in README file :)

@jgsogo jgsogo marked this pull request as ready for review December 4, 2019 11:40
import astroid # Conan 'pylint_plugin.py' uses astroid
from pylint import epylint as lint
except ImportError as e:
sys.stderr.write("Install pylint to use 'recipe_linter' hook: 'pip install pylint astroid'")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@danimtb danimtb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hooks/recipe_linter.py Show resolved Hide resolved
hooks/recipe_linter.py Show resolved Hide resolved
hooks/recipe_linter.py Outdated Show resolved Hide resolved
@danimtb
Copy link
Member

danimtb commented Dec 4, 2019

Please consider adding some nice comments in the escaping chars line and the ANSI one for clarification

hooks/recipe_linter.py Show resolved Hide resolved
hooks/recipe_linter.py Outdated Show resolved Hide resolved
@jgsogo jgsogo added the enhancement New feature or request label Dec 5, 2019
@jgsogo jgsogo merged commit 78433b7 into conan-io:master Dec 5, 2019
@jgsogo jgsogo deleted the hook/pylint branch December 5, 2019 13:35
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

Successfully merging this pull request may close these issues.

None yet

3 participants