Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/ores-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ jobs:
- name: Detect project types
id: detect
run: |
[ -f package.json ] && echo "js=true" >> "$GITHUB_OUTPUT" || echo "js=false" >> "$GITHUB_OUTPUT"
[ -f Cargo.toml ] && echo "rs=true" >> "$GITHUB_OUTPUT" || echo "rs=false" >> "$GITHUB_OUTPUT"
{ [ -f package.json ] || git ls-files '*.js' '*.mjs' '*.cjs' '*.ts' '*.tsx' | grep -q .; } \
&& echo "js=true" >> "$GITHUB_OUTPUT" || echo "js=false" >> "$GITHUB_OUTPUT"
{ [ -f Cargo.toml ] || git ls-files '*.rs' | grep -q .; } \
&& echo "rs=true" >> "$GITHUB_OUTPUT" || echo "rs=false" >> "$GITHUB_OUTPUT"
{ [ -f pubspec.yaml ] || git ls-files '*.dart' | grep -q .; } \
&& echo "dart=true" >> "$GITHUB_OUTPUT" || echo "dart=false" >> "$GITHUB_OUTPUT"
{ [ -f gleam.toml ] || git ls-files '*.gleam' | grep -q .; } \
&& echo "gleam=true" >> "$GITHUB_OUTPUT" || echo "gleam=false" >> "$GITHUB_OUTPUT"

# Node is the runner for ESLint and for the cross-language require-send
# scanner, so it is installed whenever any supported language is present.
- uses: actions/setup-node@v4
if: steps.detect.outputs.js == 'true'
if: steps.detect.outputs.js == 'true' || steps.detect.outputs.rs == 'true' || steps.detect.outputs.dart == 'true' || steps.detect.outputs.gleam == 'true'
with:
node-version: '22'

Expand All @@ -33,6 +41,12 @@ jobs:
if: steps.detect.outputs.rs == 'true'
run: rustup component add clippy || true

# Dart/Gleam SDKs are optional. When absent, dart.sh / gleam.sh skip
# with an actionable message; require-send.mjs still runs via Node.
- uses: dart-lang/setup-dart@v1
if: steps.detect.outputs.dart == 'true'
continue-on-error: true

- name: Run ores-lint
run: sh .ores-lint/lint.sh
env:
Expand Down
Loading