-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
🆘 help wantedassistance is requiredassistance is required💡 good first issuegood for newcomersgood for newcomers🤓 UXUX improvement for CLI usersUX improvement for CLI users🧩 utils
Description
User story
As a user of the CLI I want to have click through experience for all actionable feedback a get from the audit issues.
At the moment the provided issues often show exactly where the error needs to get fixed, but a manual navigation to the line of code is required.
Example:
| Severity | Message | Source file | Line(s) |
|---|---|---|---|
| Lines 1-18 are not covered in any test case. | src/lib/index.ts |
1-18 | |
| Line 104 is not covered in any test case. | src/lib/index.ts |
104 |
| Severity | Message | Source file | Line(s) |
|---|---|---|---|
| 🚨 error | 1st branch is not taken in any test case. | src/lib/index.ts |
101 |
| 🚨 error | 1st branch is not taken in any test case. | src/lib/index.ts |
1 |
Acceptance criteria
- The report contains links to the IDE
- When the link is clicked it opens the source file in the IDE
- Webstorm - only file is linkable over relative path (
../src/lib/index.ts) - Code - file and line are linkable over relative path (
../src/lib/index.ts#L9) - GitHub - file and line rang is linkable over a relative path (
../src/lib/index.ts#L4-L8)
- Webstorm - only file is linkable over relative path (
- When no location of the report is present (location of report file unknown) the static file path is displayed. No link is used.
Folder:
/
├── .code-pushup
│ └── report.json
└── src
└── lib
└── index.ts
Link in report:
[src/lib/index.ts](../src/lib/index.ts)
Example Report:
| Severity | Message | Source file | Line(s) |
|---|---|---|---|
| Lines 1-18 are not covered in any test case. | src/lib/index.ts |
1-18 | |
| Line 104 is not covered in any test case. | src/lib/index.ts |
104 |
| Severity | Message | Source file | Line(s) |
|---|---|---|---|
| 🚨 error | 1st branch is not taken in any test case. | src/lib/index.ts |
101 |
| 🚨 error | 1st branch is not taken in any test case. | src/lib/index.ts |
1 |
Implementation details
Essential logic and tests are present in the following PR, the over all configuration handling is not fully thought through.
https://github.com/code-pushup/cli/tree/add-link-to-local-filesystem-in-reports
Related Issues:
Metadata
Metadata
Assignees
Labels
🆘 help wantedassistance is requiredassistance is required💡 good first issuegood for newcomersgood for newcomers🤓 UXUX improvement for CLI usersUX improvement for CLI users🧩 utils