-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactoring and removing check.v1 #20
Conversation
Signed-off-by: Paulo Gomes <[email protected]>
This representation is mostly useful within the context of go-git-fixtures. go-billy Filesystem interface is too generic, which makes this implementation violate the Liskov Principle. When more narrow representations of the filesystem are available in go-billy, this could be moved upstream. Signed-off-by: Paulo Gomes <[email protected]>
8251fe9
to
276b7c3
Compare
The refactoring achieves a few goals: - Support for fully in-memory execution, without the need of extracting tgz files into disk. - Removal of the deprecated check.v1 dependency. Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
tmpPrefix = "tmp-tgz-" | ||
) | ||
|
||
type Option func(*options) |
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.
What is an Option
?
We should probably add lint configs to enforce rules like comments and code quality |
@aymanbagabas added some linters and fixed the initial issues, we can expand the linters list as we go. We should roll them out across the other repositories as well. PTAL |
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
test: | ||
$(GOTEST) ./... | ||
|
||
generate: $(esc) | ||
$(GOCMD) generate | ||
validate: validate-lint validate-dirty ## Run validation checks. |
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.
Is this necessary? Instead, we can use a build workflow to run the linter. Contributors should have their editor linter set up.
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.
The idea here is mostly to align CI and local, with the least amount of assumptions about a developer/contributors' environment.
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.
Merging it as is, but happy to discuss further what this should look like across the org.
- name: Validate | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: make validate |
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.
- name: Validate | |
if: matrix.platform == 'ubuntu-latest' | |
run: make validate | |
- name: Validate | |
if: matrix.platform == 'ubuntu-latest' | |
run: make validate |
This PR refactors this library. Summary of changes:
billy.Filesystem
that is based on an underlyingembed.FS
.