Skip to content

Commit

Permalink
Merge pull request #430 from muno92/feature-427
Browse files Browse the repository at this point in the history
Add parameter to override MSBuild configuration
  • Loading branch information
muno92 authored Nov 20, 2023
2 parents b139be1 + 9ca50c7 commit a4fa5cb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ Lets you specify a custom location for the data that InspectCode caches.

More info: https://www.jetbrains.com/help/resharper/InspectCode.html#inspection-parameters

### properties

Lets you override MSBuild properties.
You can use a semicolon to separate multiple properties `--properties:prop1=val1;prop2=val2`.

Example:

```text
--properties:Platform=x64;Configuration=Debug
```

## Usage

```yaml
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ inputs:
cachesHome:
required: false
description: Lets you specify a custom location for the data that InspectCode caches.
properties:
required: false
description: Lets you override MSBuild properties. You can use a semicolon to separate multiple properties --properties:prop1=val1;prop2=val2.
runs:
using: 'node20'
main: 'dist/index.js'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resharper_inspectcode",
"version": "1.9.3",
"version": "1.10.0",
"private": true,
"description": "Run ReSharper Inspection action",
"main": "lib/main.js",
Expand Down
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ async function run(): Promise<void> {
command += ` --caches-home=${cachesHome}`
}

const properties: string = core.getInput('properties') ?? ''
if (properties) {
command += ` --properties=${properties}`
}

const workingDir: string = core.getInput('workingDirectory')
if (workingDir) {
core.debug(`Changing to working directory: ${workingDir}`)
Expand Down

0 comments on commit a4fa5cb

Please sign in to comment.