Skip to content

Commit

Permalink
fix: testing project generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhazen committed Feb 6, 2025
1 parent 6500bf6 commit 69712ba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cs-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ jobs:
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "🔎 Detecting changed C# files in PR..."
FILES=$(git diff --name-only origin/main...HEAD | grep '\.cs$' || true)
FILES=$(git diff --name-only origin/main...HEAD -- "*.cs" || true)
else
echo "🟢 Manual run detected! Running on ALL C# files..."
FILES=$(find Assets com.playeveryware.eos -type f -name "*.cs" ! -path "*/EOS_SDK/*" | tr '\n' ' ')
FILES=$(find Assets com.playeveryware.eos -type f -name "*.cs" ! -path "*/EOS_SDK/*" || true)
fi
if [ -z "$FILES" ]; then
echo "✅ No C# files to analyze!"
exit 0
fi
echo "Files to analyze:"
echo "$FILES"
echo "FILES=$FILES" >> $GITHUB_ENV
# Convert newline-separated list into a comma-separated list
FILES_CSV=$(echo "$FILES" | tr '\n' ',' | sed 's/,$//')
echo "Files to analyze: $FILES_CSV"
echo "FILES=$FILES_CSV" >> $GITHUB_ENV
- name: Run Roslyn Analyzers Using `dotnet format`
continue-on-error: true # Allow warnings but don’t fail the workflow
run: |
for file in $FILES; do
echo "🔍 Running analyzers on $file"
dotnet format style --verify-no-changes --include "$file" --severity info --no-restore --verbosity diagnostic "workspace.sln" 2>&1 | tee -a lint_warnings.log
done
echo "🔍 Running analyzers on multiple files..."
dotnet format style --verify-no-changes --include "$FILES" --severity info --no-restore --verbosity diagnostic "workspace.sln" 2>&1 | tee -a lint_warnings.log
- name: Print Lint Warnings
run: |
Expand Down

0 comments on commit 69712ba

Please sign in to comment.