Skip to content

Commit

Permalink
refactor: remove conversão de json em string
Browse files Browse the repository at this point in the history
  • Loading branch information
katiacih committed Jul 31, 2023
1 parent 2f0f674 commit a9c137d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions dist/index.js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12763,7 +12763,8 @@ function getDetektReport() {
const detektReport = files.map((file) => {
return buildCheckstyleObject(detektReportPath, file.files)
}).reduce((acc, val) => acc.concat(val), [])
return JSON.stringify(detektReport)
return detektReport
// return JSON.stringify(detektReport)
}

const KTLINT_REPORT_PATH = 'app/build/reports/ktlint'
Expand Down Expand Up @@ -13071,12 +13072,12 @@ function runDetekt() {
core.info('\u001b[38;5;6m[info] Iniciando análise do detekt')

report = getDetektReport()
core.setOutput('Detekt', report)
core.notice(`\u001b[32;5;6m 🚀 Processo concluído verifique abaixo os erros reportados ${report}`)
core.setOutput('Detekt', JSON.stringify(report))
core.notice(`\u001b[32;5;6m 🚀 Processo concluído verifique abaixo os erros reportados ${JSON.stringify(report)}`)
console.log(`Version: ${report[0].version}`)
console.log('Verifique os erros abaixo:')

console.table(files)
console.table(report[0].file)
return report
})

Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ function runDetekt() {
core.info('\u001b[38;5;6m[info] Iniciando análise do detekt')

report = getDetektReport()
core.setOutput('Detekt', report)
core.notice(`\u001b[32;5;6m 🚀 Processo concluído verifique abaixo os erros reportados ${report}`)
core.setOutput('Detekt', JSON.stringify(report))
core.notice(`\u001b[32;5;6m 🚀 Processo concluído verifique abaixo os erros reportados ${JSON.stringify(report)}`)
console.log(`Version: ${report[0].version}`)
console.log('Verifique os erros abaixo:')

console.table(files)
console.table(report[0].file)
return report
})

Expand Down
3 changes: 2 additions & 1 deletion src/controller/linterManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ function getDetektReport() {
const detektReport = files.map((file) => {
return buildCheckstyleObject(detektReportPath, file.files)
}).reduce((acc, val) => acc.concat(val), [])
return JSON.stringify(detektReport)
return detektReport
// return JSON.stringify(detektReport)
}

const KTLINT_REPORT_PATH = 'app/build/reports/ktlint'
Expand Down

0 comments on commit a9c137d

Please sign in to comment.