DockerCLI/cli/command/image
Sebastiaan van Stijn 888df09879
linting: address assorted issues found by gocritic
internal/test/builders/config.go:36:15: captLocal: `ID' should not be capitalized (gocritic)
    func ConfigID(ID string) func(config *swarm.Config) {
                  ^
    internal/test/builders/secret.go:45:15: captLocal: `ID' should not be capitalized (gocritic)
    func SecretID(ID string) func(secret *swarm.Secret) {
                  ^
    internal/test/builders/service.go:21:16: captLocal: `ID' should not be capitalized (gocritic)
    func ServiceID(ID string) func(*swarm.Service) {
                   ^
    cli/command/image/formatter_history.go💯15: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(c.h.CreatedBy, "\t", " ", -1)` (gocritic)
        createdBy := strings.Replace(c.h.CreatedBy, "\t", " ", -1)
                     ^
    e2e/image/push_test.go:246:34: badCall: suspicious Join on 1 argument (gocritic)
        assert.NilError(t, os.RemoveAll(filepath.Join(dir.Join("trust"))))
                                        ^
    e2e/image/push_test.go:313:34: badCall: suspicious Join on 1 argument (gocritic)
        assert.NilError(t, os.RemoveAll(filepath.Join(dir.Join("trust"))))
                                        ^
    cli/config/configfile/file_test.go:185:2: assignOp: replace `c.GetAllCallCount = c.GetAllCallCount + 1` with `c.GetAllCallCount++` (gocritic)
        c.GetAllCallCount = c.GetAllCallCount + 1
        ^
    cli/command/context/inspect_test.go:20:58: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(si.MetadataPath, `\`, `\\`, -1)` (gocritic)
        expected = strings.Replace(expected, "<METADATA_PATH>", strings.Replace(si.MetadataPath, `\`, `\\`, -1), 1)
                                                                ^
    cli/command/context/inspect_test.go:21:53: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(si.TLSPath, `\`, `\\`, -1)` (gocritic)
        expected = strings.Replace(expected, "<TLS_PATH>", strings.Replace(si.TLSPath, `\`, `\\`, -1), 1)
                                                           ^
    cli/command/container/formatter_stats.go:119:46: captLocal: `Stats' should not be capitalized (gocritic)
    func statsFormatWrite(ctx formatter.Context, Stats []StatsEntry, osType string, trunc bool) error {
                                                 ^
    cli/command/container/stats_helpers.go:209:4: assignOp: replace `blkRead = blkRead + bioEntry.Value` with `blkRead += bioEntry.Value` (gocritic)
                blkRead = blkRead + bioEntry.Value
                ^
    cli/command/container/stats_helpers.go:211:4: assignOp: replace `blkWrite = blkWrite + bioEntry.Value` with `blkWrite += bioEntry.Value` (gocritic)
                blkWrite = blkWrite + bioEntry.Value
                ^
    cli/command/registry/formatter_search.go:67:10: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(c.s.Description, "\n", " ", -1)` (gocritic)
        desc := strings.Replace(c.s.Description, "\n", " ", -1)
                ^
    cli/command/registry/formatter_search.go:68:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(desc, "\r", " ", -1)` (gocritic)
        desc = strings.Replace(desc, "\r", " ", -1)
               ^
    cli/command/service/list_test.go:164:5: assignOp: replace `tc.doc = tc.doc + " with quiet"` with `tc.doc += " with quiet"` (gocritic)
                    tc.doc = tc.doc + " with quiet"
                    ^
    cli/command/service/progress/progress.go:274:11: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(errMsg, "\n", " ", -1)` (gocritic)
        errMsg = strings.Replace(errMsg, "\n", " ", -1)
                 ^
    cli/manifest/store/store.go:153:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(fileName, "/", "_", -1)` (gocritic)
        return strings.Replace(fileName, "/", "_", -1)
               ^
    cli/manifest/store/store.go:152:14: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(ref, ":", "-", -1)` (gocritic)
        fileName := strings.Replace(ref, ":", "-", -1)
                    ^
    cli/command/plugin/formatter.go:79:10: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(c.p.Config.Description, "\n", "", -1)` (gocritic)
        desc := strings.Replace(c.p.Config.Description, "\n", "", -1)
                ^
    cli/command/plugin/formatter.go:80:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(desc, "\r", "", -1)` (gocritic)
        desc = strings.Replace(desc, "\r", "", -1)
               ^
    cli/compose/convert/service.go:642:23: captLocal: `DNS' should not be capitalized (gocritic)
    func convertDNSConfig(DNS []string, DNSSearch []string) *swarm.DNSConfig {
                          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-20 16:02:16 +01:00
..
build image/build: use "nolint" comment to work around gosec regression 2023-10-24 11:10:51 +02:00
testdata force TestNewHistoryCommandSuccess to use UTC timezone 2023-08-28 10:43:21 +02:00
build.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
build_test.go test/e2e: Use "frozen" tag to reference test images 2023-04-27 10:57:57 +02:00
client_test.go vendor: github.com/docker/docker cdb3f9fb8dca (v25.0.0-dev) 2023-10-13 22:09:04 +02:00
cmd.go Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
formatter_history.go linting: address assorted issues found by gocritic 2023-11-20 16:02:16 +01:00
formatter_history_test.go format code with gofumpt 2022-09-30 11:59:11 +02:00
history.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
history_test.go force TestNewHistoryCommandSuccess to use UTC timezone 2023-08-28 10:43:21 +02:00
import.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
import_test.go cli/command/image: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:55 +01:00
inspect.go Output compact JSON by default for --format=json 2022-03-15 15:42:35 +01:00
inspect_test.go vendor: github.com/docker/docker v20.10.3-0.20220309172631-83b51522df43 2022-03-09 18:45:37 +01:00
list.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
list_test.go vendor: github.com/docker/docker cdb3f9fb8dca (v25.0.0-dev) 2023-10-13 22:09:04 +02:00
load.go format code with gofumpt 2022-09-30 11:59:11 +02:00
load_test.go cli/command/image: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:55 +01:00
prune.go cmd: set double quotes as code delimiter 2023-01-06 19:15:33 +01:00
prune_test.go vendor: github.com/docker/docker cdb3f9fb8dca (v25.0.0-dev) 2023-10-13 22:09:04 +02:00
pull.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
pull_test.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
push.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
push_test.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
remove.go replace uses of client.IsErrNotFound for errdefs.IsNotFound 2023-05-11 23:09:29 +02:00
remove_test.go vendor: github.com/docker/docker cdb3f9fb8dca (v25.0.0-dev) 2023-10-13 22:09:04 +02:00
save.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
save_test.go cli/command/image: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:55 +01:00
tag.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
tag_test.go cli/command/image: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:41:55 +01:00
trust.go migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
trust_test.go replace uses of deprecated env.Patch() 2022-09-22 17:28:07 +02:00