Skip to content

Commit 69712ba

Browse files
committed
fix: testing project generation.
1 parent 6500bf6 commit 69712ba

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/cs-linter.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@ jobs:
3636
run: |
3737
if [ "${{ github.event_name }}" = "pull_request" ]; then
3838
echo "🔎 Detecting changed C# files in PR..."
39-
FILES=$(git diff --name-only origin/main...HEAD | grep '\.cs$' || true)
39+
FILES=$(git diff --name-only origin/main...HEAD -- "*.cs" || true)
4040
else
4141
echo "🟢 Manual run detected! Running on ALL C# files..."
42-
FILES=$(find Assets com.playeveryware.eos -type f -name "*.cs" ! -path "*/EOS_SDK/*" | tr '\n' ' ')
42+
FILES=$(find Assets com.playeveryware.eos -type f -name "*.cs" ! -path "*/EOS_SDK/*" || true)
4343
fi
4444
4545
if [ -z "$FILES" ]; then
4646
echo "✅ No C# files to analyze!"
4747
exit 0
4848
fi
4949
50-
echo "Files to analyze:"
51-
echo "$FILES"
52-
echo "FILES=$FILES" >> $GITHUB_ENV
50+
# Convert newline-separated list into a comma-separated list
51+
FILES_CSV=$(echo "$FILES" | tr '\n' ',' | sed 's/,$//')
52+
53+
echo "Files to analyze: $FILES_CSV"
54+
echo "FILES=$FILES_CSV" >> $GITHUB_ENV
5355
5456
- name: Run Roslyn Analyzers Using `dotnet format`
5557
continue-on-error: true # Allow warnings but don’t fail the workflow
5658
run: |
57-
for file in $FILES; do
58-
echo "🔍 Running analyzers on $file"
59-
dotnet format style --verify-no-changes --include "$file" --severity info --no-restore --verbosity diagnostic "workspace.sln" 2>&1 | tee -a lint_warnings.log
60-
done
59+
echo "🔍 Running analyzers on multiple files..."
60+
dotnet format style --verify-no-changes --include "$FILES" --severity info --no-restore --verbosity diagnostic "workspace.sln" 2>&1 | tee -a lint_warnings.log
6161
6262
- name: Print Lint Warnings
6363
run: |

0 commit comments

Comments
 (0)