This action inspect code with ReSharper Command Line Tool.
Inspection result is annotate to PR File Change Tab.
Required
Path to Solution file to be inspected.
Whether the action should fail if there are any issues. Default is '1'
.
Set this option to '0'
prevent the action from failing when issues exist (annotations will still be present).
Version of the Resharper CLI tool to install. Defaults to the latest available.
- INFO
- HINT (default)
- SUGGESTION
- WARNING
- ERROR
Minimum severity for issues to be reported. Defaults to "HINT".
- error
- warning
- notice (default)
Minimum severity for issues to cause the action to fail. Defaults to "notice". Ignored if failOnIssue
is set to '0'
.
Relative path(s) or file masks that define which files to exclude during the inspection.
More info: https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters
Include one or more paths or file masks; see the documentation. Specify one path or pattern per line.
Example:
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ./YourSolution.sln
include: |
**.cs
**.cshtml
Comma-separated or line-separated list of issue types to ignore.
Example:
UnusedField.Compiler,UnusedMember.Global
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ./YourSolution.sln
ignoreIssueType: |
UnusedField.Compiler
UnusedMember.Global
Issue Types reference: https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html
- true
- false
Explicitly enable or disable solution-wide analysis. If not specified, solution-wide analysis will be enabled or disabled based on the existing settings.
Comma-separated list of extensions to install.
Example:
StyleCop.StyleCop,ReSharperPlugin.CognitiveComplexity
The directory to run the command in. All paths (solution path, include/exclude patterns, etc) are also relative to this directory.
- true
- false (default)
et you specify whether to build the target solution before starting the analysis.
By default, InspectCode always builds the solution.
More info: https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters
Lets you specify a custom location for the data that InspectCode caches.
More info: https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters
This parameter lets you control the level of detail in InspectCode's output.
More info: https://www.jetbrains.com/help/resharper/InspectCode.html#auxiliary-parameters
Lets you override MSBuild properties.
You can use a semicolon to separate multiple properties --properties:prop1=val1;prop2=val2
.
Example:
Platform=x64;Configuration=Debug
Lets you specify the version of the .NET SDK to use. (Default is the latest version).
on: [push]
jobs:
inspection:
runs-on: ubuntu-latest # or macos-latest, windows-latest
name: Inspection
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
id: setup-dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # [3.1.x, 5.0.x, 6.0.x, 7.0.x, 8.0.x]
- name: Restore
run: dotnet restore
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ./YourSolution.sln
dotnetVersion: ${{ steps.setup-dotnet.outputs.dotnet-version }}