-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make gator output relative paths #2443
fix: make gator output relative paths #2443
Conversation
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Codecov ReportBase: 53.63% // Head: 53.60% // Decreases project coverage by
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.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -89,10 +89,11 @@ func runE(cmd *cobra.Command, args []string) error { | |||
if strings.HasSuffix(originalPath, "/...") { | |||
recursive = true | |||
targetPath = strings.TrimSuffix(targetPath, "...") | |||
originalPath = strings.TrimSuffix(originalPath, "...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the PR! @acpana!
Signed-off-by: Alex Pana 8968914+acpana@users.noreply.github.com
fixes #1640
This patch attaches the
InputPath
/OriginalPath
to aSuite
. We still use the absolute path for file lookups at run time (runTest
).Examples of how this works now in practice: