diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3abd0e34..33bd9a5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,8 +112,28 @@ jobs: dotnet new tool-manifest dotnet tool install JetBrains.ReSharper.GlobalTools + # Create a temporary solution and add all .cs files + - name: Create temporary solution + run: | + # Create a temporary directory for the solution + mkdir -p _temp + cd _temp + + # Create a new solution + dotnet new sln -n TempSolution + + # Create a temporary project and add all .cs files + dotnet new classlib -n TempProject + rm ./TempProject/Class1.cs + + # Copy all .cs files from Assets to the temp project + find ../Assets -name "*.cs" -exec cp {} ./TempProject/ \; + + # Add project to solution + dotnet sln add ./TempProject/TempProject.csproj + + cd .. + - name: Run ReSharper CLI inspection run: | - dotnet jb inspectcode . --output=inspect-results.xml --severity=WARNING \ - --include="Assets/**/*.cs" \ - --exclude="**/Library/**/*.cs;**/Temp/**/*.cs;**/obj/**/*.cs" \ No newline at end of file + dotnet jb inspectcode ./_temp/TempSolution.sln --output=inspect-results.xml --severity=WARNING \ No newline at end of file