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 Pylint command to jinja template #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

evisos-ons
Copy link

What is the context of this PR?

Pylint is mentioned in the README.md but not implemented in the MAKEFILE of the template and when the template is used, evident in the demo.

How to review

Pull changes, use template, run make lint to run black, ruff, mypy and pylint.

After using the template on another repository, the ruff, pylint and mypy commands run but finish with an error that stops subsequent commands from running:

make: *** [<command>] Error
@evisos-ons
Copy link
Author

evisos-ons commented Sep 13, 2024

Addition to PR

After using the template on another repository, when using make lint, the black and ruff sub-commands run but the pylint and mypy sub-commands don't as the ruff sub-command returns an error:

make: *** [<command>] Error

Adding in <command> || true to here ensures the subsequent sub-commands run when using the make lint command.

Comment on lines +26 to +27
{{ package_manager }} run ruff check . || true
{{ package_manager }} run pylint {{ module_name }} || true
Copy link
Contributor

Choose a reason for hiding this comment

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

The || true at the end of these commands means that the command will always exit with a status of 0 (success), regardless of whether the linter encounters any issues. Since these are used in CI this is not recommended.

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

Successfully merging this pull request may close these issues.

2 participants