-
Notifications
You must be signed in to change notification settings - Fork 133
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
Edit prepare exclusions pattern function #794
Conversation
sarao1310
commented
Jul 2, 2023
•
edited
edited
- All tests passed. If this feature is not already covered by the tests, I added new tests.
- All static analysis checks passed.
- This pull request is on the dev branch.
- I used gofmt for formatting the code before submitting the pull request.
|
|
|
|
|
// Transform to regexp and prepare Exclude patterns to be used | ||
func PrepareExcludePathPattern(params serviceutils.FileGetter) string { | ||
// Transform to regexp and prepare Exclude patterns to be used, exclusion patterns must be absolute paths. | ||
func PrepareExcludePathPattern(exclusions []string, patternType utils.PatternType, isRecursive bool) (string, error) { |
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.
isRecursive --> recursive
This function never returned an error, so it probably shouldn't declare it.
This PR seems to be changing nothing except for this function's prototype change. Are you sure this PR is needed? Please reply here.
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.
yes, We now use PrepareExcludePathPattern in the ArchiveProject function in cli-core (that has been called by the GoPublish command), and GoPublishParams does not inherit from FileGetter, so I change the prototype to pass only parameters we really use in PrepareExcludePathPattern.
I'll change the return value.
…o add-exclude-flag-to-publish