Skip to content
Snippets Groups Projects
Commit 414ebe6d authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Add python code analysis via sourcery

Disable all checks which do not pass currently. These should be enabled
in the future along with a code refactoring to make them pass.
parent df817ecf
No related branches found
No related tags found
1 merge request!259Add python code analysis via sourcery
Pipeline #70198 skipped with stage
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
variables: variables:
# CI_IMAGES_BASEPATH: Environment variable configure in gitlab # CI_IMAGES_BASEPATH: Environment variable configure in gitlab
CI_IMAGES_PATH: ${CI_IMAGES_BASEPATH}/ci-images CI_IMAGES_PATH: ${CI_IMAGES_BASEPATH}/ci-images
CI_IMAGES_REVISION: 5dfddb02d67bbd16beb09ff4e31afcd5380f5788 CI_IMAGES_REVISION: 4449cc4f3f57e5fd0941c54715466cd789eca4d0
CI_IMAGE_PYTHON: "${CI_IMAGES_PATH}/python/3.9:${CI_IMAGES_REVISION}" CI_IMAGE_PYTHON: "${CI_IMAGES_PATH}/python/3.9:${CI_IMAGES_REVISION}"
CI_IMAGE_YOCTO: "${CI_IMAGES_PATH}/yocto-build/ubuntu-20.04:${CI_IMAGES_REVISION}" CI_IMAGE_YOCTO: "${CI_IMAGES_PATH}/yocto-build/ubuntu-20.04:${CI_IMAGES_REVISION}"
...@@ -70,6 +70,13 @@ script_limit: ...@@ -70,6 +70,13 @@ script_limit:
--key before_script --key before_script
--key after_script --key after_script
sourcery:
extends: .analyze
script:
- cd scripts
- sourcery login --token $SOURCERY_TOKEN
- sourcery review --check --verbose *.py
yamllint: yamllint:
extends: .analyze extends: .analyze
script: script:
......
version: '1'
rule_settings:
enable:
- default
disable:
- use-fstring-for-formatting
- replace-interpolation-with-fstring
- use-fstring-for-concatenation
- merge-dict-assign
- assign-if-exp
- reintroduce-else
- inline-immediately-returned-variable
- remove-redundant-if
- list-comprehension
- merge-duplicate-blocks
- split-or-ifs
- switch
- dict-literal
- low-code-quality
- move-assign-in-block
- swap-if-expression
- dict-comprehension
- for-append-to-extend
- raise-specific-error
- simplify-len-comparison
- de-morgan
- merge-nested-ifs
- remove-dict-keys
- remove-zero-from-range
- use-named-expression
- use-next
- introduce-default-else
- sum-comprehension
- swap-if-else-branches
- use-join
- merge-comparisons
- merge-else-if-into-elif
- min-max-identity
- or-if-exp-identity
- remove-pass-elif
- remove-redundant-continue
- remove-str-from-print
- simplify-constant-sum
- simplify-fstring-formatting
- simplify-generator
- use-assigned-variable
- use-datetime-now-not-today
rule_types:
- refactoring
- suggestion
- comment
python_version: '3.9'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment