From a1bead11eac35ab87164198dfc6c194ab5b96a61 Mon Sep 17 00:00:00 2001 From: Takayuki Nakata Date: Wed, 9 Nov 2022 22:22:37 +0900 Subject: [PATCH] Accept Clippy flags --- dist/index.js | Bin 239323 -> 239373 bytes dist/index.js.map | Bin 278242 -> 278292 bytes src/main.ts | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index df63f30c89e625b6800dd4cfda0cacd856a040da..6291e57e3bb266d7a59285a576b5b69ac3c85793 100644 GIT binary patch delta 118 zcmcb8maq35--avF%E>vI1qGFEIf?1T3bqQ#`9-OE>8T~2c?G2<8tM?q$x^a1o3BU< zvq?M>EDrzx delta 72 zcmeA@$9MZI--avFn}ubBStj4tFy36CFoQ>4Utb}_-^JfbAulyGMWG~Lp*SJrf^NUjT(o;)3^9o8!G}IxI@o6Ag^~no$ z#Wv5;l4p_BQP9)VD@ZIVPSrrtt{JN{d7-|<aU N0WtG-E*q8`OaKVlEq?$2 delta 87 zcmbR8PvFsCfemxCHs8^bXJLxfncQd~G5No_^yCB!(akaXH+bar^%X+=UHq*S@={Y% p6iV_HiZgRda}rBZ6_OH*Gwhr7Y})l~7=f4xh?%$R*|0og0syL*9x(s_ diff --git a/src/main.ts b/src/main.ts index c8dd68f..0603e3a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,6 +13,7 @@ async function run(): Promise { try { const reviewdogVersion = core.getInput('reviewdog_version') || 'latest' const toolName = core.getInput('tool_name') || 'clippy' + const clippyFlags = core.getInput('clippy_flags'); const level = core.getInput('level') || 'error' const reporter = core.getInput('reporter') || 'github-pr-check' const filterMode = core.getInput('filter_mode') || 'added' @@ -37,7 +38,7 @@ async function run(): Promise { const output: string[] = [] await exec.exec( 'cargo', - ['clippy', '--color', 'never', '-q', '--message-format', 'json'], + ['clippy', '--color', 'never', '-q', '--message-format', 'json', ...parse(clippyFlags)], { cwd, ignoreReturnCode: true, @@ -128,7 +129,6 @@ function parse(flags: string): string[] { return [] } - // TODO: need to simulate bash? return flags.split(/\s+/) }