fix: make gator output relative paths#2443
Conversation
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2443 +/- ##
==========================================
- Coverage 53.63% 53.60% -0.03%
==========================================
Files 117 117
Lines 10281 10293 +12
==========================================
+ Hits 5514 5518 +4
- Misses 4346 4352 +6
- Partials 421 423 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if strings.HasSuffix(originalPath, "/...") { | ||
| recursive = true | ||
| targetPath = strings.TrimSuffix(targetPath, "...") | ||
| originalPath = strings.TrimSuffix(originalPath, "...") |
There was a problem hiding this comment.
in this file, right above lines 68-79 see how we create a fileSystem .
Since we pass that in and the absolute path, it's hard to print the results with the input path, given that we can traverse a directory.
Another way to tackle this problem, where we don't pass in the InputPath would be to push down the fileSystem/ absolute path creation to the point where we walk the directory or where we try to read a file. But I think that approach would require a more sweeping refactor.
maxsmythe
left a comment
There was a problem hiding this comment.
LGTM, thanks for doing this!
Signed-off-by: Alex Pana 8968914+acpana@users.noreply.github.com
fixes #1640
This patch attaches the
InputPath/OriginalPathto aSuite. We still use the absolute path for file lookups at run time (runTest).Examples of how this works now in practice: