-
Notifications
You must be signed in to change notification settings - Fork 192
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
utils/file: remove usage of find command to search for files #719
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65e574c
to
d18feac
Compare
d18feac
to
021c142
Compare
iancardosozup
added a commit
that referenced
this pull request
Oct 26, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
approved these changes
Oct 26, 2021
021c142
to
d413b87
Compare
Previously some functions of utils/file package use the command find to search for files, which make only Linux compatible and add an unnecessary dependency. This commit change the implementation to use filepath.Walk function and search using only the Go std. This commit also make some improvements on function names, remove dead code and add some documentation. Also this commit change some usages of ReplacePathSeparator to use filepath.Join instead which is a better approach since this package is OS compatible. Note that not all usages of ReplacePathSeparator was changed since in some cases we need to replace slashes on paths that was returned from tools that run on Docker when we are running on Windows. Signed-off-by: Matheus Alcantara <[email protected]>
d413b87
to
eee2519
Compare
nathanmartinszup
approved these changes
Oct 27, 2021
wiliansilvazup
approved these changes
Oct 27, 2021
iancardosozup
added a commit
that referenced
this pull request
Oct 27, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Oct 28, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
iancardosozup
added a commit
that referenced
this pull request
Nov 3, 2021
this commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should Signed-off-by: Ian Cardoso <[email protected]>
matheusalcantarazup
pushed a commit
that referenced
this pull request
Nov 3, 2021
…ths (#720) This commits updates language detect tests and some file matching checks now using filepath.Join(), removing ReplacePathSeparator usages on this package as discussed in #719 and fix to_ignore paths to run as it should. Signed-off-by: Ian Cardoso <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously some functions of utils/file package use the command find
to search for files, which make only Linux compatible and add an
unnecessary dependency. This commit change the implementation to use
filepath.Walk function and search using only the Go std.
This commit also make some improvements on function names, remove
dead code and add some documentation.
Also this commit change some usages of ReplacePathSeparator to use
filepath.Join instead which is a better approach since this package is
OS compatible. Note that not all usages of ReplacePathSeparator was
changed since in some cases we need to replace slashes on paths that
was returned from tools that run on Docker when we are running on
Windows.
Signed-off-by: Matheus Alcantara [email protected]
- What I did
- How to verify it
- Description for the changelog