Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensions input #407

Merged
merged 1 commit into from
Jul 20, 2023
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ Issue Types reference: https://www.jetbrains.com/help/resharper/Reference__Code_
Explicitly enable or disable solution-wide analysis. If not specified, solution-wide analysis will
be enabled or disabled based on the existing settings.

### extensions

Comma-separated list of extensions to install.

Example:

```text
StyleCop.StyleCop,ReSharperPlugin.CognitiveComplexity
```

### workingDirectory

The directory to run the command in. All paths (solution path, include/exclude patterns, etc) are
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ inputs:
solutionWideAnalysis:
required: false
description: Explicitly enable or disable solution-wide analysis. If not specified, solution-wide analysis will be enabled or disabled based on the existing settings.
extensions:
required: false
description: Comma-separated list of extensions to install.
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ async function run(): Promise<void> {

command += ` --severity=${minimumReportSeverity}`

const extensions: string = core.getInput('extensions')
if (extensions) {
command += ` --extensions=${extensions.trim().replace(/(,\s?)|(;\s?)/g, ';')}`
}

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