add static analysis action
This commit is contained in:
+10
-23
@@ -1,9 +1,9 @@
|
||||
name: ProxmoxAAS-Dashboard Code Style Check
|
||||
run-name: Code style check on ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}
|
||||
name: ProxmoxAAS-Dashboard Web Components Code Style
|
||||
run-name: Code Style: [${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}] Web Components
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
lint-check:
|
||||
@@ -34,12 +34,12 @@ jobs:
|
||||
|
||||
- name: Run HTMLValidate
|
||||
id: html_lint
|
||||
run: npx html-validate --config dev_config/.htmlvalidate.json "web/html/**/*"
|
||||
run: npx html-validate --config dev_config/.htmlvalidate.json 'web/html/**/*'
|
||||
|
||||
- name: Run Stylelint
|
||||
id: style_lint
|
||||
if: always()
|
||||
run: npx stylelint --config dev_config/.stylelintrc.json --formatter verbose --fix "web/css/**/*.css"
|
||||
run: npx stylelint --config dev_config/.stylelintrc.json --formatter verbose --fix 'web/css/**/*.css'
|
||||
|
||||
- name: Run ESLint
|
||||
id: js_lint
|
||||
@@ -49,21 +49,8 @@ jobs:
|
||||
run: npx eslint --config dev_config/eslint.config.mjs --fix web/scripts/
|
||||
|
||||
- name: Verify Linters
|
||||
if: always()
|
||||
run: |
|
||||
FAILED=0
|
||||
if [ "${{ steps.html_lint.outcome }}" != "success" ]; then
|
||||
echo "HTML Linter failed"
|
||||
FAILED=1
|
||||
fi
|
||||
if [ "${{ steps.style_lint.outcome }}" != "success" ]; then
|
||||
echo "Style Linter failed"
|
||||
FAILED=1
|
||||
fi
|
||||
if [ "${{ steps.js_lint.outcome }}" != "success" ]; then
|
||||
echo "JS Linter failed"
|
||||
FAILED=1
|
||||
fi
|
||||
if [ $FAILED -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
if: >
|
||||
steps.html_lint.outcome != 'success' ||
|
||||
steps.style_lint.outcome != 'success' ||
|
||||
steps.js_lint.outcome != 'success'
|
||||
run: exit 1
|
||||
Reference in New Issue
Block a user