File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,12 @@ jobs:
2121 - name : Restore dependencies
2222 run : dotnet restore
2323
24- # Format the output of dotnet format
25- - name : Add dotnet-format problem matcher
26- uses : xt0rted/dotnet-format-problem-matcher@v1
27-
2824 # Install dotnet format as a global tool
29- - name : Install dotnet format
30- run : |
31- dotnet tool install --global dotnet-format
32- dotnet format --verify-no-changes --verbosity diagnostic
25+ - name : Install dotnet tools
26+ run : dotnet tool restore
27+
28+ - name : Run Linter
29+ run : check.sh
3330
3431 - name : Build
3532 run : dotnet build --no-restore
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ dotnet jb inspectcode Notion.sln -f=" Text" --no-build --include=" **.cs" -o=" .lint/CodeWarningResults.txt"
4+
5+ totalLines=` cat .lint/CodeWarningResults.txt | grep " ^.*$" -c`
6+
7+ if [[ " $totalLines " -gt 1 ]]; then
8+ echo " There are few linter warnings - please fix them before running the pipeline"
9+ cat .lint/CodeWarningResults.txt
10+ exit 1
11+ fi
You can’t perform that action at this time.
0 commit comments