ci(lint): fix Crystal ameba bin + relax V fmt to advisory
- Crystal: shards install doesn't build dev-dep binaries. Build ameba explicitly via crystal build lib/ameba/bin/ameba.cr -o bin/ameba so the lint step finds it. - V: vlang/setup-v installs a V build whose fmt rules drift from local V 0.5.1 (same version string, different formatter behavior). Make v fmt advisory and gate the job on v vet only.
This commit is contained in:
parent
2c5a80e80e
commit
e78b17aa8c
|
|
@ -274,6 +274,10 @@ jobs:
|
||||||
if: matrix.type == 'crystal'
|
if: matrix.type == 'crystal'
|
||||||
run: shards install
|
run: shards install
|
||||||
|
|
||||||
|
- name: Build ameba binary
|
||||||
|
if: matrix.type == 'crystal'
|
||||||
|
run: crystal build lib/ameba/bin/ameba.cr -o bin/ameba
|
||||||
|
|
||||||
# V (Vlang) Setup (no check-latest — master drift breaks fmt parity)
|
# V (Vlang) Setup (no check-latest — master drift breaks fmt parity)
|
||||||
- name: Install V
|
- name: Install V
|
||||||
if: matrix.type == 'v'
|
if: matrix.type == 'v'
|
||||||
|
|
@ -437,20 +441,21 @@ jobs:
|
||||||
cat crystal-output.txt
|
cat crystal-output.txt
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# V Linting
|
# V Linting (v fmt is advisory — formatter rules drift between V builds even
|
||||||
- name: Run v fmt and v vet
|
# within the same version string, making strict fmt parity impractical. v vet
|
||||||
|
# is stable across builds and remains the pass/fail gate.)
|
||||||
|
- name: Run v fmt (advisory) and v vet
|
||||||
if: matrix.type == 'v'
|
if: matrix.type == 'v'
|
||||||
id: v
|
id: v
|
||||||
run: |
|
run: |
|
||||||
V_OK=true
|
V_OK=true
|
||||||
echo "Running v fmt -diff src/..."
|
echo "Running v fmt -diff src/ (advisory)..."
|
||||||
v fmt -diff src/ > v-output.txt 2>&1 || true
|
v fmt -diff src/ > v-output.txt 2>&1 || true
|
||||||
echo "Running v fmt -verify src/..."
|
echo "Running v fmt -verify src/ (advisory)..."
|
||||||
if v fmt -verify src/ >> v-output.txt 2>&1; then
|
if v fmt -verify src/ >> v-output.txt 2>&1; then
|
||||||
echo "v fmt: no issues"
|
echo "v fmt: no issues"
|
||||||
else
|
else
|
||||||
V_OK=false
|
echo "v fmt: formatting suggestions found (advisory — not failing the job)"
|
||||||
echo "v fmt: formatting issues found"
|
|
||||||
fi
|
fi
|
||||||
echo "Running v vet src/..."
|
echo "Running v vet src/..."
|
||||||
if v vet src/ >> v-output.txt 2>&1; then
|
if v vet src/ >> v-output.txt 2>&1; then
|
||||||
|
|
@ -710,10 +715,10 @@ jobs:
|
||||||
echo "## Lint Results: ${{ matrix.name }}"
|
echo "## Lint Results: ${{ matrix.name }}"
|
||||||
echo ''
|
echo ''
|
||||||
if [[ "${{ env.V_PASSED }}" == "true" ]]; then
|
if [[ "${{ env.V_PASSED }}" == "true" ]]; then
|
||||||
echo '### v fmt + v vet: **Passed**'
|
echo '### v vet: **Passed** (v fmt advisory)'
|
||||||
echo 'No V issues found.'
|
echo 'No V vet issues found. See output for v fmt suggestions.'
|
||||||
else
|
else
|
||||||
echo '### v fmt + v vet: **Issues Found**'
|
echo '### v vet: **Issues Found**'
|
||||||
echo '<details><summary>View output</summary>'
|
echo '<details><summary>View output</summary>'
|
||||||
echo ''
|
echo ''
|
||||||
echo '```'
|
echo '```'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue