Update the blender template with fix about the lint CI

This commit is contained in:
Aurelien Vaillant
2022-06-08 18:25:11 +02:00
parent a6dd36176d
commit 4b26268b74
3 changed files with 61 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
import sys
import os
import pathlib
from pylint import lint
if __name__ == "__main__":
folder: str = ''
for v in sys.argv:
if '--module=' in v:
folder = v.replace('--module=', '')
if folder is False:
print(f'Module folder not set.')
sys.exit(1)
run = lint.Run([f'--rcfile={pathlib.Path(os.getcwd(), "linter", ".pylintrc")}', folder],
do_exit=False)
if run.linter.stats.fatal or run.linter.stats.error:
print('Pylint failed.')
sys.exit(1)
sys.exit(0)
+2 -3
View File
@@ -23,8 +23,7 @@ jobs:
echo "::set-output name=folder::$(python '.github/package.py')"
python -m pip install --upgrade pip
python -m pip install -r linter/requirements_linter.txt
- name: Execute the pylinter
- name: Execute Pylint
run: |
cd ${{ github.workspace }}
pylint --rcfile=${{ github.workspace }}/linter/.pylintrc ${{ steps.config.outputs.folder }} -E
python '${{ github.workspace }}/.github/lint.py' --module=${{ steps.config.outputs.folder }}