Skip to content

Commit

Permalink
Added code analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
odelaere committed Aug 6, 2021
1 parent 1ed70d0 commit bb9411c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/main.yml
Expand Up @@ -48,14 +48,13 @@ jobs:
env:
cache-name: cache-eggs
with:
path: ./buildout-cache/eggs ./eggs
path: ~/buildout-cache/eggs
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
- name: buildout
run: |
cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg
buildout annotate
buildout
buildout -c ci.cfg annotate
buildout -c ci.cfg
- name: test
run: |
bin/test
Expand Down Expand Up @@ -91,14 +90,16 @@ jobs:
env:
cache-name: cache-eggs
with:
path: ./buildout-cache/eggs ./eggs
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
path: ~/buildout-cache/eggs
key: ${{ runner.os }}-build-${{ env.cache-name }}-coverage-${{ matrix.PLONE_VERSION }}
- name: buildout
run: |
cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg
buildout annotate
buildout
buildout -c ci.cfg annotate
buildout -c ci.cfg
- name: code-analysis
run: |
bin/code-analysis
- name: test coverage
run: |
bin/coverage run bin/test
Expand Down
6 changes: 6 additions & 0 deletions .isort.cfg
@@ -0,0 +1,6 @@
[settings]
force_alphabetical_sort = True
force_single_line = True
lines_after_imports = 2
line_length = 200
not_skip = __init__.py
11 changes: 8 additions & 3 deletions base.cfg
Expand Up @@ -33,6 +33,11 @@ eggs =
defaults = ['-s', '${buildout:package-name}', '--auto-color', '--auto-progress']

[code-analysis]
flake8-max-complexity = 50
flake8-ignore = E501, W503, W504, E203, Q000, C812
directory = src/imio/helpers
recipe = plone.recipe.codeanalysis
pre-commit-hook = True
return-status-codes = True
directory =
${buildout:directory}/src/imio/helpers
flake8-ignore = E123,E124,E501,E126,E127,E128,W391,C901,W503,W504
flake8-extensions =
flake8-isort
11 changes: 11 additions & 0 deletions ci.cfg
@@ -0,0 +1,11 @@
[buildout]
extends =
buildout.cfg
eggs-directory = ~/.buildout/eggs

parts +=
createcoverage

[createcoverage]
recipe = zc.recipe.egg
eggs = createcoverage
1 change: 1 addition & 0 deletions test_plone4.cfg
Expand Up @@ -14,6 +14,7 @@ allow-picked-versions = true
setuptools = 42.0.2
zc.buildout = 2.13.2
configparser = 4.0.2
isort = 4.3.21
Pillow = 4.0.0
coverage = 5.3.1
# Added by buildout at 2020-06-22 13:45:36.514713
Expand Down
1 change: 1 addition & 0 deletions test_plone51.cfg
Expand Up @@ -13,6 +13,7 @@ allow-picked-versions = true
[versions]
setuptools = 42.0.2
zc.buildout = 2.13.2
isort = 4.3.21
toml = 0.10.2
traitlets = 4.3.2
# Added by buildout at 2020-06-22 13:24:06.304460
Expand Down
1 change: 1 addition & 0 deletions test_plone52.cfg
Expand Up @@ -13,6 +13,7 @@ allow-picked-versions = true
[versions]
setuptools = 42.0.2
zc.buildout = 2.13.2
isort = 4.3.21
prompt-toolkit = 3.0.19
toml = 0.10.2
# Added by buildout at 2020-06-22 13:20:15.457149
Expand Down

0 comments on commit bb9411c

Please sign in to comment.