mirror of https://github.com/docker/cli.git
dc9e069ff2
Changed `matcher.Matches(file)` to `matcher.MatchesOrParentMatches(file)`:
cli/command/image/build/context.go:95:9: SA1019: matcher.Matches is deprecated: This implementation is buggy (it only checks a single parent dir against the pattern) and will be removed soon. Use either MatchesOrParentMatches or MatchesUsingParentResults instead. (staticcheck)
return matcher.Matches(file)
^
And updated a test to match the JSON omitting empty RootFS.Type fields (in
practice, this field should never be empty in real situations, and always
be "layer"). Changed the test to use subtests to easier find which case
is failing.
full diff:
|
||
---|---|---|
.. | ||
Dockerfile.test | ||
gittar.test | ||
history-command-success.non-human.golden | ||
history-command-success.quiet-no-trunc.golden | ||
history-command-success.quiet.golden | ||
history-command-success.simple.golden | ||
import-command-success.input.txt | ||
inspect-command-success.format.golden | ||
inspect-command-success.simple-many.golden | ||
inspect-command-success.simple.golden | ||
list-command-success.filters.golden | ||
list-command-success.format.golden | ||
list-command-success.match-name.golden | ||
list-command-success.quiet-format.golden | ||
list-command-success.simple.golden | ||
load-command-success.input-file.golden | ||
load-command-success.input.txt | ||
load-command-success.json.golden | ||
load-command-success.simple.golden | ||
prune-command-success.all.golden | ||
prune-command-success.force-deleted.golden | ||
prune-command-success.force-untagged.golden | ||
prune-command-success.label-filter.golden | ||
pull-command-success.simple-no-tag.golden | ||
pull-command-success.simple-quiet.golden | ||
pull-command-success.simple.golden | ||
remove-command-success.Image Deleted and Untagged.golden | ||
remove-command-success.Image Deleted.golden | ||
remove-command-success.Image Untagged.golden | ||
remove-command-success.Image not found with force option.golden | ||
tar.test |