Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

LegitSecurity/resharper_inspectcode

 
 

Repository files navigation

build-test

ReSharper CLI InspectCode

This action inspect code with ReSharper Command Line Tool.

Inspection result is annotate to PR File Change Tab.

Annotation

Input

solutionPath

Required

Inspection Target Solution File Path

failOnIssue

Default is '1'.

Set this option '0', only annotation is enabled, action will not fail when issue is exists.

version

Default is '2021.1.5'.

Set this option to change the version of the ReSharper CLI that's installed.

minimumSeverity

  • error
  • warning
  • notice (default)

If set this option 'warning', action will fail when error or warning issue is exists. (Notice issue is annotated only.)

exclude

Set this options to specified exclude path to ReSharper CLI.

(See https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters)

ignoreIssueType

Comma-separated list of ignore issue type.

example)

UnusedField.Compiler,UnusedMember.Global

References:
https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html#BestPractice

Usage

on: [push]

jobs:
  inspection:
    runs-on: ubuntu-latest # or macos-latest, windows-latest
    name: Inspection
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup .NET
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: '6.0.x' # or 3.1.x, 5.0.x
      - name: Restore
        run: dotnet restore
      - name: Inspect code
        uses: muno92/[email protected]
        with:
          solutionPath: ./YourSolution.sln

Update ReSharper version

  1. In src/installer.ts, change the version number in line 6 to the required version.
  2. Run npm run-script all.
  3. commit & push.
  4. Create new tag for this repository.
  5. In the repositories that uses this action, change the tag in the workflow to the new tag.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.0%
  • C# 3.2%
  • JavaScript 2.8%