Update the blender template with fix about the lint CI
This commit is contained in:
@@ -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)
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user