Skip to content

Commit

Permalink
feat: show absolute path in --detail mode, as link in console
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed Nov 13, 2018
1 parent 29b7b00 commit a56bea5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion clean-scripts.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
build: [
'rimraf dist/',
'tsc -p src/',
'node dist/index.js -p src --detail --supressError > spec/result.txt'
'node dist/index.js -p src --detail --supressError'
],
lint: {
ts: `tslint ${tsFiles}`,
Expand Down
15 changes: 0 additions & 15 deletions spec/result.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function executeCommandLine() {

const { correctCount, totalCount, anys } = await lint(argv.p || argv.project || '.', argv.detail, argv.debug)
for (const { file, line, character, text } of anys) {
console.log(`${file}:${line + 1}:${character + 1}: ${text}`)
console.log(`${path.resolve(process.cwd(), file)}:${line + 1}:${character + 1}: ${text}`)
}
const percent = Math.round(10000 * correctCount / totalCount) / 100
console.log(`${correctCount} / ${totalCount} ${percent.toFixed(2)}%`)
Expand Down

0 comments on commit a56bea5

Please sign in to comment.