minor adjustments and added .prettierrc.json
CI (Lint + Format Checks) / lint (pull_request) Successful in 1m41s
CI (Lint + Format Checks) / lint (pull_request) Successful in 1m41s
This commit is contained in:
+39
-15
@@ -20,37 +20,61 @@ jobs:
|
|||||||
python3 \
|
python3 \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
rust
|
rust
|
||||||
|
apk add --no-cache qt6-qtdeclarative-dev-tools || \
|
||||||
|
apk add --no-cache qt6-qtdeclarative-dev || \
|
||||||
|
apk add --no-cache qt6-qtdeclarative || \
|
||||||
|
echo "::warning::qmllint not available"
|
||||||
|
|
||||||
- name: Python sanity check
|
- name: Python lint
|
||||||
run: |
|
run: |
|
||||||
python3 --version
|
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
pip install --no-cache-dir ruff
|
pip install --no-cache-dir ruff
|
||||||
ruff check . || true
|
if ! ruff check .; then
|
||||||
|
echo "::warning::ruff reported issues"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: JS sanity check
|
- name: JS lint
|
||||||
run: |
|
run: |
|
||||||
node --version
|
|
||||||
npm --version
|
|
||||||
if [ -f package.json ]; then
|
if [ -f package.json ]; then
|
||||||
npm install --no-audit --no-fund || true
|
npm install --no-audit --no-fund
|
||||||
npx eslint . || true
|
if ! npx eslint .; then
|
||||||
|
echo "::warning::eslint reported issues"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "No JS project found"
|
echo "No JS project found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Rust sanity check
|
- name: JS format (prettier)
|
||||||
|
run: |
|
||||||
|
if [ -f package.json ]; then
|
||||||
|
if ! npx --yes prettier --check "**/*.{js,jsx,ts,tsx,mjs,cjs}" --ignore-path .gitignore; then
|
||||||
|
echo "::warning::prettier reported issues"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No JS project found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Rust lint
|
||||||
run: |
|
run: |
|
||||||
rustc --version
|
|
||||||
if [ -f Cargo.toml ]; then
|
if [ -f Cargo.toml ]; then
|
||||||
cargo check || true
|
if ! cargo fmt --check; then
|
||||||
cargo fmt --check || true
|
echo "::warning::rustfmt reported issues"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "No Rust project found"
|
echo "No Rust project found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: QML sanity check
|
- name: QML lint
|
||||||
run: |
|
run: |
|
||||||
echo "QML check (placeholder)"
|
if command -v qmllint >/dev/null 2>&1; then
|
||||||
find . -name "*.qml" | head -n 20
|
if [ -n "$(find . -name "*.qml" -print -quit)" ]; then
|
||||||
|
if ! find . -name "*.qml" -print0 | xargs -0 qmllint; then
|
||||||
|
echo "::warning::qmllint reported issues"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No QML files found"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No qmllint in PATH"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"jsxSingleQuote": false,
|
||||||
|
"tabWidth": 4,
|
||||||
|
"printWidth": 100,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"bracketSameLine": false,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"endOfLine": "lf",
|
||||||
|
"proseWrap": "preserve"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user