Skip to content

Fix pylint execution #1

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

Merged
merged 2 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Zero-configuration GitHub Action to maintain code quality with push and PR annotations.

On every push and pull request git diffs will get inline annotated with found errors from
selected lintners.
selected linters.

![Screenshot of annotations](static/annotations.png)

Expand Down Expand Up @@ -72,7 +72,7 @@ isort==isort-5.7.0

The python version you set up in your action script with `actions/setup-python@v2`
or by other means will not affect the linting process. The python version used by
the lintners can be set up only by `conda-python-version` argument! This also means
the linters can be set up only by `conda-python-version` argument! This also means
that if you modify the system conda environment it might affect the lintnig process.
So it is best to keep the lintnig action separated from others. It is also recomended
to run this on `ubuntu-latest`. Example:
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ runs:
$CONDA/bin/conda --version
$CONDA/bin/conda install python=${{ inputs.conda-python-version }}
shell: bash
name: Install lintners
name: Install linters
- run: |
$CONDA/bin/python --version
$CONDA/bin/pip install -r ${{ github.action_path }}/requirements.txt
shell: bash
name: Install lintners
name: Install linters
- run: >
${{ github.action_path }}/entrypoint.sh
'${{ inputs.python-root-list }}'
Expand Down
24 changes: 12 additions & 12 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# $7 - use-isort
# $8 - use-vulture
# $9 - use-pydocstyle
# $10 - extra-pylint-options
# ${10} - extra-pylint-options
# ${11} - extra-pycodestyle-options
# ${12} - extra-flake8-options
# ${13} - extra-black-options
Expand All @@ -29,14 +29,14 @@ echo use-mypy: $6
echo use-isort: $7
echo use-vulture: $8
echo use-pydocstyle $9
echo extra-pylint-options: $10
echo extra-pycodestyle-options: $11
echo extra-flake8-options: $12
echo extra-black-options: $13
echo extra-mypy-options: $14
echo extra-isort-options: $15
echo extra-vulture-options: $16
echo extra-pydocstyle-options: $17
echo extra-pylint-options: ${10}
echo extra-pycodestyle-options: ${11}
echo extra-flake8-options: ${12}
echo extra-black-options: ${13}
echo extra-mypy-options: ${14}
echo extra-isort-options: ${15}
echo extra-vulture-options: ${16}
echo extra-pydocstyle-options: ${17}

# actions path has the copy of this actions repo
for matcher in $GITHUB_ACTION_PATH/matchers/*.json
Expand All @@ -49,9 +49,9 @@ export TERM=xterm

if [ "$2" = true ] ; then

echo Running: pylint $9 $1
echo Running: pylint ${10} $1

$CONDA/bin/pylint --output-format="colorized" $9 $1
$CONDA/bin/pylint --output-format="colorized" ${10} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
Expand Down Expand Up @@ -165,4 +165,4 @@ if [ "$9" = true ] ; then
echo "pycodestyle error"
fi

fi
fi