summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/images_build.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-06-13 16:08:46 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-06-14 16:29:42 +0200
commit41528739cef3d2b61e9b7437f6c557e60dbb79c0 (patch)
tree6fec977dbeb99f71e439d79333ea74114881e31f /pkg/api/handlers/compat/images_build.go
parent78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc (diff)
downloadpodman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.tar.gz
podman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.tar.bz2
podman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.zip
golangci-lint: enable nolintlint
The nolintlint linter does not deny the use of `//nolint` Instead it allows us to enforce a common nolint style: - force that a linter name must be specified - do not add a space between `//` and `nolint` - make sure nolint is only used when there is actually a problem Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat/images_build.go')
-rw-r--r--pkg/api/handlers/compat/images_build.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index fe17aa1d4..ef0283e7e 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -78,15 +78,15 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
AppArmor string `schema:"apparmor"`
BuildArgs string `schema:"buildargs"`
CacheFrom string `schema:"cachefrom"`
- CgroupParent string `schema:"cgroupparent"` // nolint
+ CgroupParent string `schema:"cgroupparent"`
Compression uint64 `schema:"compression"`
ConfigureNetwork string `schema:"networkmode"`
CPPFlags string `schema:"cppflags"`
- CpuPeriod uint64 `schema:"cpuperiod"` // nolint
- CpuQuota int64 `schema:"cpuquota"` // nolint
- CpuSetCpus string `schema:"cpusetcpus"` // nolint
- CpuSetMems string `schema:"cpusetmems"` // nolint
- CpuShares uint64 `schema:"cpushares"` // nolint
+ CpuPeriod uint64 `schema:"cpuperiod"` //nolint:revive,stylecheck
+ CpuQuota int64 `schema:"cpuquota"` //nolint:revive,stylecheck
+ CpuSetCpus string `schema:"cpusetcpus"` //nolint:revive,stylecheck
+ CpuSetMems string `schema:"cpusetmems"` //nolint:revive,stylecheck
+ CpuShares uint64 `schema:"cpushares"` //nolint:revive,stylecheck
DNSOptions string `schema:"dnsoptions"`
DNSSearch string `schema:"dnssearch"`
DNSServers string `schema:"dnsservers"`
@@ -101,7 +101,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
IdentityLabel bool `schema:"identitylabel"`
Ignore bool `schema:"ignore"`
Isolation string `schema:"isolation"`
- Jobs int `schema:"jobs"` // nolint
+ Jobs int `schema:"jobs"`
LabelOpts string `schema:"labelopts"`
Labels string `schema:"labels"`
Layers bool `schema:"layers"`
@@ -366,7 +366,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
}
}
}
- var additionalTags []string // nolint
+ var additionalTags []string
for i := 1; i < len(tags); i++ {
possiblyNormalizedTag, err := utils.NormalizeToDockerHub(r, tags[i])
if err != nil {
@@ -799,7 +799,7 @@ func parseNetworkConfigurationPolicy(network string) buildah.NetworkConfiguratio
}
}
-func parseLibPodIsolation(isolation string) (buildah.Isolation, error) { // nolint
+func parseLibPodIsolation(isolation string) (buildah.Isolation, error) {
if val, err := strconv.Atoi(isolation); err == nil {
return buildah.Isolation(val), nil
}