Skip to content

Commit

Permalink
Add scripts for running inspections locally
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Jun 15, 2021
1 parent 9fcf105 commit a4c4867
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
11 changes: 11 additions & 0 deletions InspectCode.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dotnet tool restore

# Temporarily disabled until the tool is upgraded to 5.0.
# The version specified in .config/dotnet-tools.json (3.1.37601) won't run on .NET hosts >=5.0.7.
# - cmd: dotnet format --dry-run --check

dotnet CodeFileSanity
dotnet jb inspectcode "osu.Desktop.slnf" --output="inspectcodereport.xml" --caches-home="inspectcode" --verbosity=WARN
dotnet nvika parsereport "inspectcodereport.xml" --treatwarningsaserrors

exit $LASTEXITCODE
6 changes: 6 additions & 0 deletions InspectCode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

dotnet tool restore
dotnet CodeFileSanity
dotnet jb inspectcode "osu.Desktop.slnf" --output="inspectcodereport.xml" --caches-home="inspectcode" --verbosity=WARN
dotnet nvika parsereport "inspectcodereport.xml" --treatwarningsaserrors
10 changes: 1 addition & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@ build:
publish_nuget: true

after_build:
- cmd: dotnet tool restore

# Temporarily disabled until the tool is upgraded to 5.0.
# The version specified in .config/dotnet-tools.json (3.1.37601) won't run on .NET hosts >=5.0.7.
# - cmd: dotnet format --dry-run --check

- cmd: dotnet CodeFileSanity
- cmd: dotnet jb inspectcode "osu.Desktop.slnf" --output="temp/inspectcodereport.xml" --caches-home="temp/inspectcode" --verbosity=WARN
- cmd: dotnet nvika parsereport "temp/inspectcodereport.xml" --treatwarningsaserrors
- ps: .\InspectCode.ps1

test:
assemblies:
Expand Down

0 comments on commit a4c4867

Please sign in to comment.