diff --git a/.github/workflows/analyzer.yaml b/.github/workflows/analyzer.yaml index 4d7006e..b369708 100644 --- a/.github/workflows/analyzer.yaml +++ b/.github/workflows/analyzer.yaml @@ -24,7 +24,7 @@ jobs: 9.x - name: Build Solution - run: dotnet build test-app | tee build.log # Output to both build.log and stdout, required for `Extract warning` step + run: dotnet build ./test-app/test-app.sln > build.log # Output to both build.log and stdout, required for `Extract warning` step - name: Extract warning uses: actions/github-script@v7 @@ -41,7 +41,7 @@ jobs: const rulePatterns = { Warning: { ids: ['FAWRN\\d+'], type: 'Warning' }, Information: { ids: ['FAINF\\d+'], type: 'Information' }, - Error: { ids: [], type: 'Error' } + Error: { ids: ['-'], type: 'Error' } }; // Example match: `MyFile.cs(12,4): warning AB1234: 'Foo' is obsolete (http://example.com)` const patterns = Object.values(rulePatterns).map(({ ids, type }) => ({ @@ -145,4 +145,4 @@ jobs: } }); } - console.log(mdComment); \ No newline at end of file + console.log(mdComment); diff --git a/test-app/test-app/TestCodeAnalyzer/RawSql.cs b/test-app/test-app/TestCodeAnalyzer/RawSql.cs index c513e5d..b7c22e7 100644 --- a/test-app/test-app/TestCodeAnalyzer/RawSql.cs +++ b/test-app/test-app/TestCodeAnalyzer/RawSql.cs @@ -27,7 +27,7 @@ public RawSql(Microsoft.EntityFrameworkCore.DbContext context) public void Execute() { - _context.Set().FromSqlRaw("SELECT * FROM Entity"); // Should have warning + _context.Set().FromSqlRaw("SELECT * FROM Entity"); // Should have warning } } diff --git a/test-app/test-app/TestCodeAnalyzer/RequiredProperties.cs b/test-app/test-app/TestCodeAnalyzer/RequiredProperties.cs index 6ea4563..abb552e 100644 --- a/test-app/test-app/TestCodeAnalyzer/RequiredProperties.cs +++ b/test-app/test-app/TestCodeAnalyzer/RequiredProperties.cs @@ -35,7 +35,7 @@ public class SampleService private readonly IDataHandler _mockDataHandler = new DataHandler(); public void SampleMethod() { - _mockDataHandler.FindList(m => m.Name == "Test"); // Should warning + _mockDataHandler.FindList(m => m.Name == "Test"); // Should warning } } } \ No newline at end of file diff --git a/test-app/test-app/TestCodeAnalyzer/TaskBlocking.cs b/test-app/test-app/TestCodeAnalyzer/TaskBlocking.cs index ad42c99..96f35c6 100644 --- a/test-app/test-app/TestCodeAnalyzer/TaskBlocking.cs +++ b/test-app/test-app/TestCodeAnalyzer/TaskBlocking.cs @@ -8,7 +8,7 @@ void Example() { Task task1 = Task.CompletedTask; Task task2 = Task.FromResult(42); - task1.Wait(); // Should have warning - var result = task2.Result; // Should have warning + task1.Wait(); // Should have warning + var result = task2.Result; // Should have warning } } diff --git a/test-app/test-app/TestCodeAnalyzer/TaskBlocking2.cs b/test-app/test-app/TestCodeAnalyzer/TaskBlocking2.cs index 856500b..fe96e7e 100644 --- a/test-app/test-app/TestCodeAnalyzer/TaskBlocking2.cs +++ b/test-app/test-app/TestCodeAnalyzer/TaskBlocking2.cs @@ -9,7 +9,7 @@ void Example() Task task1 = Task.CompletedTask; Task task2 = Task.FromResult(42); task1.Wait(); // Should have warning - var result = task2.Result; // No warning, because i didn't touch + var result = task2.Result; // Should have warning } }