Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/action-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Action CI

on:
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run action smoke test
id: inspectcode
uses: ./
with:
help: "True"
format: "Text"
output: "inspectcode.txt"

- name: Validate action outputs
shell: bash
run: |
test "${{ steps.inspectcode.outputs.report-file }}" = "inspectcode.txt"
test "${{ steps.inspectcode.outputs.report-format }}" = "Text"
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Annotate
# You may pin to the exact commit or the version.
uses: JetBrains/ReSharper-InspectCode@v0.11
uses: JetBrains/ReSharper-InspectCode@v0.13
with:
solution: ./YourSolution.sln

Expand All @@ -41,7 +41,7 @@ jobs:
Use [`with`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith) to define any action parameters:
```yaml
with:
tool-version: 2025.2.3
tool-version: 2026.1.0.1
```
You can use GitHub Workflow editor to get a list of all supported inputs with descriptions.
|Name |Description |Default |
Expand Down Expand Up @@ -80,4 +80,20 @@ You can use GitHub Workflow editor to get a list of all supported inputs with de
|`build` |Build solution before processing |True |
|`target` |MsBuild target to execute before processing. |Build |
|`solution` |Solution file | |
|`tool-version` |Tool Version |2025.2.3 |
|`tool-version` |Tool Version |2026.1.0.1 |
|`dotnet-version` |.NET SDK version used to install and run ReSharper command line tools |10.x |

## Outputs

|Name |Description |
|----------------|------------------------------------------------|
|`report-file` |Path to the generated inspection report file |
|`report-format` |Output format used for the inspection report |

## Release process for `v0.13`

This PR prepares the repository for the `v0.13` action release.

After this PR is merged into `main`:
1. Create the `v0.13` tag on the merge commit.
2. Optionally create a GitHub Release for `v0.13`.
38 changes: 34 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,17 @@ inputs:
description: Solution file
tool-version:
description: Tool Version
default: "2025.3.3"
default: "2026.1.0.1"
dotnet-version:
description: .NET SDK version used to install and run ReSharper command line tools
default: "10.x"
outputs:
report-file:
description: Path to the generated inspection report file
value: ${{ steps.inspectcode.outputs.report-file }}
report-format:
description: Output format used for the inspection report
value: ${{ steps.inspectcode.outputs.report-format }}
runs:
using: composite
steps:
Expand All @@ -98,6 +108,7 @@ runs:
shell: bash
run: dotnet tool install JetBrains.ReSharper.GlobalTools --global --version ${{ inputs.tool-version }}
- name: Inspect code with ReSharper
id: inspectcode
shell: pwsh
env:
INPUT_settings: ${{ inputs.settings }}
Expand Down Expand Up @@ -133,10 +144,29 @@ runs:
INPUT_no-build: ${{ inputs.no-build }}
INPUT_build: ${{ inputs.build }}
INPUT_target: ${{ inputs.target }}
INPUT_solution: ${{ inputs.solution }}
run: |-
$command = "jb inspectcode ${{ inputs.solution }}"
dir env:INPUT_* | Where-Object Value | %{ $command += " --$($_.Name -replace "^INPUT_")=$($_.Value)" }
Invoke-Expression $command
$arguments = @()
$positionalInputs = @("solution")
Get-ChildItem env:INPUT_* | Where-Object Value | ForEach-Object {
$optionName = $_.Name -replace "^INPUT_"
if ($optionName -notin $positionalInputs) {
$arguments += "--$optionName=$($_.Value)"
}
}

if ($env:INPUT_solution) {
& jb inspectcode "$env:INPUT_solution" @arguments
} else {
& jb inspectcode @arguments
}

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

"report-file=${{ inputs.output }}" >> $env:GITHUB_OUTPUT
"report-format=${{ inputs.format }}" >> $env:GITHUB_OUTPUT
- name: Upload SARIF file
if: inputs.format == 'Sarif'
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
Expand Down
Loading