You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.tool/lint: Ignore dupl complaints for cmd/oci-image-tool/(cas|refs)*.go
Don't worry about:
$ make lint
checking lint
cmd/oci-image-tool/cas_get.go:35::warning: duplicate of cmd/oci-image-tool/refs_get.go:34-45 (dupl)
cmd/oci-image-tool/refs_get.go:34::warning: duplicate of cmd/oci-image-tool/refs_list.go:33-44 (dupl)
cmd/oci-image-tool/refs_list.go:33::warning: duplicate of cmd/oci-image-tool/cas_get.go:35-46 (dupl)
cmd/oci-image-tool/cas_get.go:35::warning: duplicate of cmd/oci-image-tool/refs_get.go:34-66 (dupl)
cmd/oci-image-tool/refs_get.go:34::warning: duplicate of cmd/oci-image-tool/cas_get.go:35-67 (dupl)
make: *** [lint] Error 1
The commands are all similar (open an engine, perform some method,
print the result), but are short enough that extracting out helpers
would be more trouble and indirection than it's worth.
Oddly, dupl seems happy to print "duplicate of
oci-image-tool/refs_get.go:..." and "duplicate of refs_get.go:..." if
when I exclude "duplicate of cmd/oci-image-tool/refs_get.go:..." or
"duplicate of .*oci-image-tool/refs_get.go:...". I want to get
"oci-image-tool" in the exclusion regular expression somewhere to
avoid accidentally skipping dupl checks for refs_get.go and similar if
they show up somewhere else in the repository, so I'm matching on the
initial filename.
This commit initially landed before the (cas|refs)_put.go commands.
After those commands landed I was getting:
cmd/oci-image-tool/cas_put.go:34::warning: duplicate of cmd/oci-image-tool/refs_put.go:36-48 (dupl)
cmd/oci-image-tool/refs_put.go:36::warning: duplicate of cmd/oci-image-tool/cas_get.go:36-48 (dupl)
So I've rebased this commit to land after the put commands and added
ignore lines for those files. I have not updates the line numbers
from the earlier 'make lint' quote, so they may have gone stale. I
expect they're similar to the quoted values if they've changed at all,
since I haven't restructured those files in any major way.
Signed-off-by: W. Trevor King <[email protected]>
0 commit comments