mirror of
https://github.com/giraffate/clippy-action.git
synced 2024-11-21 23:49:32 +01:00
commit
62b72b4c8a
3 changed files with 2 additions and 2 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
|
@ -13,6 +13,7 @@ async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const reviewdogVersion = core.getInput('reviewdog_version') || 'latest'
|
const reviewdogVersion = core.getInput('reviewdog_version') || 'latest'
|
||||||
const toolName = core.getInput('tool_name') || 'clippy'
|
const toolName = core.getInput('tool_name') || 'clippy'
|
||||||
|
const clippyFlags = core.getInput('clippy_flags');
|
||||||
const level = core.getInput('level') || 'error'
|
const level = core.getInput('level') || 'error'
|
||||||
const reporter = core.getInput('reporter') || 'github-pr-check'
|
const reporter = core.getInput('reporter') || 'github-pr-check'
|
||||||
const filterMode = core.getInput('filter_mode') || 'added'
|
const filterMode = core.getInput('filter_mode') || 'added'
|
||||||
|
@ -37,7 +38,7 @@ async function run(): Promise<void> {
|
||||||
const output: string[] = []
|
const output: string[] = []
|
||||||
await exec.exec(
|
await exec.exec(
|
||||||
'cargo',
|
'cargo',
|
||||||
['clippy', '--color', 'never', '-q', '--message-format', 'json'],
|
['clippy', '--color', 'never', '-q', '--message-format', 'json', ...parse(clippyFlags)],
|
||||||
{
|
{
|
||||||
cwd,
|
cwd,
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
|
@ -128,7 +129,6 @@ function parse(flags: string): string[] {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: need to simulate bash?
|
|
||||||
return flags.split(/\s+/)
|
return flags.split(/\s+/)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue