Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#288 Add linter (flake8) check in CI

Merged
Ofri Masad merged 1 commits into Deci-AI:master from deci-ai:feature/SG-79-add-flake_8_linter
@@ -39,6 +39,24 @@ jobs:
       - deci-common/checkout_and_skip_build:
       - deci-common/checkout_and_skip_build:
           check_version_file: true
           check_version_file: true
       - deci-common/get_persisted_version_info
       - deci-common/get_persisted_version_info
+      - when:
+          condition:
+            and:
+              - not:
+                  equal: [ develop, << pipeline.git.branch >> ]
+              - not:
+                  equal: [ staging, << pipeline.git.branch >> ]
+              - not:
+                  equal: [ master, << pipeline.git.branch >> ]
+          steps:
+            - run:
+                name: install Flake8 python linter
+                command: |
+                  pip install --user flake8
+            - run:
+                name: Lint all python files changed since develop branch
+                command: |
+                  flake8 --statistics --config scripts/flake8-config setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
       - run:
       - run:
           name: add requirements.txt to source code
           name: add requirements.txt to source code
           command: |
           command: |
Discard
Tip!

Press p or to see the previous file or, n or to see the next file