Created
April 12, 2022 06:19
-
-
Save notsobad/ef2080c7f9578037b4766b2335e5009c to your computer and use it in GitHub Desktop.
Use pylint in merge requests, only check the changed '.py' files in this MR.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- test | |
workflow: | |
rules: | |
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' | |
pylint-error-only: | |
stage: test | |
script: | |
- pylint -E `git ls-files '*.py'` | |
pylint-mr: | |
stage: test | |
script: | |
- FLIST=$(git --no-pager diff --name-only $(git merge-base --fork-point origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME) $CI_COMMIT_SHA | grep "\.py$") | |
- echo $FLIST | xargs -r pylint -f parseable -r y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment