diff --git a/dist/index.js/index.js b/dist/index.js/index.js index 244b46f..bd4c110 100644 --- a/dist/index.js/index.js +++ b/dist/index.js/index.js @@ -9582,7 +9582,14 @@ function getDetektReport() { const KTLINT_REPORT_PATH = 'app/build/reports/ktlint' function getKtlintReport() { - return searchJSONfiles(KTLINT_REPORT_PATH) + const files = searchJSONfiles(KTLINT_REPORT_PATH) + + const ktlintReport = files + .map(file => loadFile(file)) + .map(file => JSON.parse(file)) + .flat() + + return JSON.stringify(ktlintReport) } /** @@ -17663,10 +17670,6 @@ function runKtlint() { const childProcess = spawn(command, { shell: true }) try { - childProcess.stdout.on('data', (data) => { - core.info(`\u001b[38;5;6m[info] Saída do comando: ${data}`) - }) - childProcess.stderr.on('data', (data) => { core.setFailed(`\u001b[38;5;6m[erro] EXEC -> Erro no comando bash: ${data}`) }) @@ -17675,6 +17678,7 @@ function runKtlint() { core.info('\u001b[38;5;6m[info] Iniciando análise do ktlint') report = getKtlintReport() + console.log('report', report) core.setOutput('result > ktlint', report) core.notice(`\u001b[32;5;6m 🚀 Processo concluído -> ${report}`) return report diff --git a/index.js b/index.js index 54bcb13..55fe7b6 100644 --- a/index.js +++ b/index.js @@ -36,10 +36,6 @@ function runKtlint() { const childProcess = spawn(command, { shell: true }) try { - childProcess.stdout.on('data', (data) => { - core.info(`\u001b[38;5;6m[info] Saída do comando: ${data}`) - }) - childProcess.stderr.on('data', (data) => { core.setFailed(`\u001b[38;5;6m[erro] EXEC -> Erro no comando bash: ${data}`) }) diff --git a/src/controller/detektManager.js b/src/controller/detektManager.js index 3b16272..aca00fa 100644 --- a/src/controller/detektManager.js +++ b/src/controller/detektManager.js @@ -19,7 +19,14 @@ function getDetektReport() { const KTLINT_REPORT_PATH = 'app/build/reports/ktlint' function getKtlintReport() { - return searchJSONfiles(KTLINT_REPORT_PATH) + const files = searchJSONfiles(KTLINT_REPORT_PATH) + + const ktlintReport = files + .map(file => loadFile(file)) + .map(file => JSON.parse(file)) + .flat() + + return JSON.stringify(ktlintReport) } /**