An action that runs smelly-python
and post summaries of present code smells to jobs and to PRs. Smelly Python runs pylint
to check code smells present in your code. This action then posts a job summary in the Actions tab and a comment on your PR (if you pushed to a branch that has an open PR).
Required input:
command
: command that runssmelly-python
on the module you want to analyse. We automatically install smelly-python using pipenv so you can usepipenv run smelly-python -d <module>
.github-token: ${{secrets.GITHUB_TOKEN}}
optional input:
install-pipenv
(Default True): Installs pipenv before trying to install smelly-python. Only set this to False when you have manually installed pipenv earlier.
It is necessary to include the following permissions in your job. See the example of a workflow setup below.
permissions:
checks: write
pull-requests: write
contents: read
Example:
jobs:
linter:
[...]
permissions:
checks: write
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v3
[...]
- uses: smelly-python/smell-my-pr@main
with:
github-token: ${{secrets.GITHUB_TOKEN}}
command: pipenv run smelly-python -d src
install-pipenv: true