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 Verbosity Control #463

Merged
merged 15 commits into from
Apr 11, 2024
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ Lets you specify a custom location for the data that InspectCode caches.

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

### verbosity
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

### properties

Lets you override MSBuild properties.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ inputs:
dotnetVersion:
required: false
description: Lets you specify the version of the .NET SDK to use.
verbosity:
required: false
description: Sets the verbosity level of the output. [OFF, FATAL, ERROR, WARN, INFO, VERBOSE, TRACE]
runs:
using: 'node20'
main: 'dist/index.js'
Expand Down
6 changes: 5 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ async function run(): Promise<void> {

let command = `jb inspectcode --output=${outputPath} --absolute-paths ${solutionPath}`

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

const include: string = core.getInput('include')
if (include) {
command += ` --include="${include.trim().replace(/[\r\n]+/g, ';')}"`
Expand Down