mirror of
https://github.com/containers/podman.git
synced 2025-07-03 17:27:18 +08:00
ci: rm allow-unused from nolintlint settings
This was added by commit 84e42877a ("make lint: re-enable revive"), making nolintlint became almost useless. Remove the ungodly amount of unused nolint annotations. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@ -58,7 +58,6 @@ linters-settings:
|
|||||||
errcheck:
|
errcheck:
|
||||||
check-blank: false
|
check-blank: false
|
||||||
nolintlint:
|
nolintlint:
|
||||||
allow-unused: true
|
|
||||||
require-specific: true
|
require-specific: true
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
|
@ -252,10 +252,10 @@ func combineBytesValues(a, b uint64) string {
|
|||||||
|
|
||||||
func outputJSON(stats []containerStats) error {
|
func outputJSON(stats []containerStats) error {
|
||||||
type jstat struct {
|
type jstat struct {
|
||||||
Id string `json:"id"` //nolint:revive
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
CPUTime string `json:"cpu_time"`
|
CPUTime string `json:"cpu_time"`
|
||||||
CpuPercent string `json:"cpu_percent"` //nolint:revive
|
CpuPercent string `json:"cpu_percent"`
|
||||||
AverageCPU string `json:"avg_cpu"`
|
AverageCPU string `json:"avg_cpu"`
|
||||||
MemUsage string `json:"mem_usage"`
|
MemUsage string `json:"mem_usage"`
|
||||||
MemPerc string `json:"mem_percent"`
|
MemPerc string `json:"mem_percent"`
|
||||||
|
@ -221,7 +221,7 @@ func (l ListPodReporter) ID() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Id returns the Pod id
|
// Id returns the Pod id
|
||||||
func (l ListPodReporter) Id() string { //nolint:revive
|
func (l ListPodReporter) Id() string {
|
||||||
if noTrunc {
|
if noTrunc {
|
||||||
return l.ListPodsReport.Id
|
return l.ListPodsReport.Id
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ func (l ListPodReporter) InfraID() string {
|
|||||||
|
|
||||||
// InfraId returns the infra container id for the pod
|
// InfraId returns the infra container id for the pod
|
||||||
// depending on trunc
|
// depending on trunc
|
||||||
func (l ListPodReporter) InfraId() string { //nolint:revive
|
func (l ListPodReporter) InfraId() string {
|
||||||
if len(l.ListPodsReport.InfraId) == 0 {
|
if len(l.ListPodsReport.InfraId) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,6 @@ func migrate(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
// FIXME change this to return the error like other commands
|
// FIXME change this to return the error like other commands
|
||||||
// defer will never run on os.Exit()
|
// defer will never run on os.Exit()
|
||||||
//nolint:gocritic
|
|
||||||
os.Exit(define.ExecErrorCodeGeneric)
|
os.Exit(define.ExecErrorCodeGeneric)
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
@ -38,12 +38,12 @@ func init() {
|
|||||||
Parent: systemCmd,
|
Parent: systemCmd,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func renumber(cmd *cobra.Command, args []string) {
|
func renumber(cmd *cobra.Command, args []string) {
|
||||||
if err := registry.ContainerEngine().Renumber(registry.Context()); err != nil {
|
if err := registry.ContainerEngine().Renumber(registry.Context()); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
// FIXME change this to return the error like other commands
|
// FIXME change this to return the error like other commands
|
||||||
// defer will never run on os.Exit()
|
// defer will never run on os.Exit()
|
||||||
//nolint:gocritic
|
|
||||||
os.Exit(define.ExecErrorCodeGeneric)
|
os.Exit(define.ExecErrorCodeGeneric)
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
@ -20,7 +20,6 @@ type SpecData struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDualStackSplit(t *testing.T) {
|
func TestDualStackSplit(t *testing.T) {
|
||||||
//nolint:revive
|
|
||||||
const (
|
const (
|
||||||
IP4_ALL = "0.0.0.0"
|
IP4_ALL = "0.0.0.0"
|
||||||
IP4__LO = "127.0.0.1"
|
IP4__LO = "127.0.0.1"
|
||||||
|
@ -86,10 +86,10 @@ type ExecConfig struct {
|
|||||||
type ExecSession struct {
|
type ExecSession struct {
|
||||||
// Id is the ID of the exec session.
|
// Id is the ID of the exec session.
|
||||||
// Named somewhat strangely to not conflict with ID().
|
// Named somewhat strangely to not conflict with ID().
|
||||||
Id string `json:"id"` //nolint:revive
|
Id string `json:"id"`
|
||||||
// ContainerId is the ID of the container this exec session belongs to.
|
// ContainerId is the ID of the container this exec session belongs to.
|
||||||
// Named somewhat strangely to not conflict with ContainerID().
|
// Named somewhat strangely to not conflict with ContainerID().
|
||||||
ContainerId string `json:"containerId"` //nolint:revive
|
ContainerId string `json:"containerId"`
|
||||||
|
|
||||||
// State is the state of the exec session.
|
// State is the state of the exec session.
|
||||||
State define.ContainerExecStatus `json:"state"`
|
State define.ContainerExecStatus `json:"state"`
|
||||||
|
@ -356,8 +356,6 @@ type HealthCheckLog struct {
|
|||||||
// as possible from the spec and container config.
|
// as possible from the spec and container config.
|
||||||
// Some things cannot be inferred. These will be populated by spec annotations
|
// Some things cannot be inferred. These will be populated by spec annotations
|
||||||
// (if available).
|
// (if available).
|
||||||
//
|
|
||||||
//nolint:revive // Field names are fixed for compatibility and cannot be changed.
|
|
||||||
type InspectContainerHostConfig struct {
|
type InspectContainerHostConfig struct {
|
||||||
// Binds contains an array of user-added mounts.
|
// Binds contains an array of user-added mounts.
|
||||||
// Both volume mounts and named volumes are included.
|
// Both volume mounts and named volumes are included.
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
// FileLocks is a struct enabling POSIX lock locking in a shared memory
|
// FileLocks is a struct enabling POSIX lock locking in a shared memory
|
||||||
// segment.
|
// segment.
|
||||||
type FileLocks struct { //nolint:revive // struct name stutters
|
type FileLocks struct {
|
||||||
lockPath string
|
lockPath string
|
||||||
valid bool
|
valid bool
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ var (
|
|||||||
|
|
||||||
// SHMLocks is a struct enabling POSIX semaphore locking in a shared memory
|
// SHMLocks is a struct enabling POSIX semaphore locking in a shared memory
|
||||||
// segment.
|
// segment.
|
||||||
type SHMLocks struct { //nolint:revive // linter complains about stutter
|
type SHMLocks struct {
|
||||||
lockStruct *C.shm_struct_t
|
lockStruct *C.shm_struct_t
|
||||||
maxLocks uint32
|
maxLocks uint32
|
||||||
valid bool
|
valid bool
|
||||||
|
@ -243,7 +243,7 @@ func CreateImageFromSrc(w http.ResponseWriter, r *http.Request) {
|
|||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Progress string `json:"progress"`
|
Progress string `json:"progress"`
|
||||||
ProgressDetail map[string]string `json:"progressDetail"`
|
ProgressDetail map[string]string `json:"progressDetail"`
|
||||||
Id string `json:"id"` //nolint:revive
|
Id string `json:"id"`
|
||||||
}{
|
}{
|
||||||
Status: report.Id,
|
Status: report.Id,
|
||||||
ProgressDetail: map[string]string{},
|
ProgressDetail: map[string]string{},
|
||||||
|
@ -110,11 +110,11 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
|
|||||||
Compression uint64 `schema:"compression"`
|
Compression uint64 `schema:"compression"`
|
||||||
ConfigureNetwork string `schema:"networkmode"`
|
ConfigureNetwork string `schema:"networkmode"`
|
||||||
CPPFlags string `schema:"cppflags"`
|
CPPFlags string `schema:"cppflags"`
|
||||||
CpuPeriod uint64 `schema:"cpuperiod"` //nolint:revive
|
CpuPeriod uint64 `schema:"cpuperiod"`
|
||||||
CpuQuota int64 `schema:"cpuquota"` //nolint:revive
|
CpuQuota int64 `schema:"cpuquota"`
|
||||||
CpuSetCpus string `schema:"cpusetcpus"` //nolint:revive
|
CpuSetCpus string `schema:"cpusetcpus"`
|
||||||
CpuSetMems string `schema:"cpusetmems"` //nolint:revive
|
CpuSetMems string `schema:"cpusetmems"`
|
||||||
CpuShares uint64 `schema:"cpushares"` //nolint:revive
|
CpuShares uint64 `schema:"cpushares"`
|
||||||
DNSOptions string `schema:"dnsoptions"`
|
DNSOptions string `schema:"dnsoptions"`
|
||||||
DNSSearch string `schema:"dnssearch"`
|
DNSSearch string `schema:"dnssearch"`
|
||||||
DNSServers string `schema:"dnsservers"`
|
DNSServers string `schema:"dnsservers"`
|
||||||
|
@ -443,25 +443,21 @@ func (c *Connection) GetDialer(ctx context.Context) (net.Conn, error) {
|
|||||||
|
|
||||||
// IsInformational returns true if the response code is 1xx
|
// IsInformational returns true if the response code is 1xx
|
||||||
func (h *APIResponse) IsInformational() bool {
|
func (h *APIResponse) IsInformational() bool {
|
||||||
//nolint:usestdlibvars // linter wants to use http.StatusContinue over 100 but that makes less readable IMO
|
|
||||||
return h.Response.StatusCode/100 == 1
|
return h.Response.StatusCode/100 == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSuccess returns true if the response code is 2xx
|
// IsSuccess returns true if the response code is 2xx
|
||||||
func (h *APIResponse) IsSuccess() bool {
|
func (h *APIResponse) IsSuccess() bool {
|
||||||
//nolint:usestdlibvars // linter wants to use http.StatusContinue over 100 but that makes less readable IMO
|
|
||||||
return h.Response.StatusCode/100 == 2
|
return h.Response.StatusCode/100 == 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRedirection returns true if the response code is 3xx
|
// IsRedirection returns true if the response code is 3xx
|
||||||
func (h *APIResponse) IsRedirection() bool {
|
func (h *APIResponse) IsRedirection() bool {
|
||||||
//nolint:usestdlibvars // linter wants to use http.StatusContinue over 100 but that makes less readable IMO
|
|
||||||
return h.Response.StatusCode/100 == 3
|
return h.Response.StatusCode/100 == 3
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsClientError returns true if the response code is 4xx
|
// IsClientError returns true if the response code is 4xx
|
||||||
func (h *APIResponse) IsClientError() bool {
|
func (h *APIResponse) IsClientError() bool {
|
||||||
//nolint:usestdlibvars // linter wants to use http.StatusContinue over 100 but that makes less readable IMO
|
|
||||||
return h.Response.StatusCode/100 == 4
|
return h.Response.StatusCode/100 == 4
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,6 +468,5 @@ func (h *APIResponse) IsConflictError() bool {
|
|||||||
|
|
||||||
// IsServerError returns true if the response code is 5xx
|
// IsServerError returns true if the response code is 5xx
|
||||||
func (h *APIResponse) IsServerError() bool {
|
func (h *APIResponse) IsServerError() bool {
|
||||||
//nolint:usestdlibvars // linter wants to use http.StatusContinue over 100 but that makes less readable IMO
|
|
||||||
return h.Response.StatusCode/100 == 5
|
return h.Response.StatusCode/100 == 5
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ var (
|
|||||||
shortName: "busybox",
|
shortName: "busybox",
|
||||||
tarballName: "busybox.tar",
|
tarballName: "busybox.tar",
|
||||||
}
|
}
|
||||||
CACHE_IMAGES = []testImage{alpine, busybox} //nolint:revive
|
CACHE_IMAGES = []testImage{alpine, busybox}
|
||||||
)
|
)
|
||||||
|
|
||||||
type bindingTest struct {
|
type bindingTest struct {
|
||||||
|
@ -89,7 +89,7 @@ type PauseUnPauseOptions struct {
|
|||||||
|
|
||||||
type PauseUnpauseReport struct {
|
type PauseUnpauseReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ type StopOptions struct {
|
|||||||
|
|
||||||
type StopReport struct {
|
type StopReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ type KillOptions struct {
|
|||||||
|
|
||||||
type KillReport struct {
|
type KillReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ type RestartOptions struct {
|
|||||||
|
|
||||||
type RestartReport struct {
|
type RestartReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ type CopyOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CommitReport struct {
|
type CommitReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContainerExportOptions struct {
|
type ContainerExportOptions struct {
|
||||||
@ -235,7 +235,7 @@ type RestoreOptions struct {
|
|||||||
type RestoreReport = types.RestoreReport
|
type RestoreReport = types.RestoreReport
|
||||||
|
|
||||||
type ContainerCreateReport struct {
|
type ContainerCreateReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// AttachOptions describes the cli and other values
|
// AttachOptions describes the cli and other values
|
||||||
@ -315,7 +315,7 @@ type ContainerStartOptions struct {
|
|||||||
// ContainerStartReport describes the response from starting
|
// ContainerStartReport describes the response from starting
|
||||||
// containers from the cli
|
// containers from the cli
|
||||||
type ContainerStartReport struct {
|
type ContainerStartReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
Err error
|
Err error
|
||||||
ExitCode int
|
ExitCode int
|
||||||
@ -360,7 +360,7 @@ type ContainerRunOptions struct {
|
|||||||
// a container
|
// a container
|
||||||
type ContainerRunReport struct {
|
type ContainerRunReport struct {
|
||||||
ExitCode int
|
ExitCode int
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerCleanupOptions are the CLI values for the
|
// ContainerCleanupOptions are the CLI values for the
|
||||||
@ -378,7 +378,7 @@ type ContainerCleanupOptions struct {
|
|||||||
// container cleanup
|
// container cleanup
|
||||||
type ContainerCleanupReport struct {
|
type ContainerCleanupReport struct {
|
||||||
CleanErr error
|
CleanErr error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
RmErr error
|
RmErr error
|
||||||
RmiErr error
|
RmiErr error
|
||||||
@ -395,7 +395,7 @@ type ContainerInitOptions struct {
|
|||||||
// container init
|
// container init
|
||||||
type ContainerInitReport struct {
|
type ContainerInitReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +418,7 @@ type ContainerUnmountOptions struct {
|
|||||||
// ContainerMountReport describes the response from container mount
|
// ContainerMountReport describes the response from container mount
|
||||||
type ContainerMountReport struct {
|
type ContainerMountReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Name string
|
Name string
|
||||||
Path string
|
Path string
|
||||||
}
|
}
|
||||||
@ -426,7 +426,7 @@ type ContainerMountReport struct {
|
|||||||
// ContainerUnmountReport describes the response from umounting a container
|
// ContainerUnmountReport describes the response from umounting a container
|
||||||
type ContainerUnmountReport struct {
|
type ContainerUnmountReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerPruneOptions describes the options needed
|
// ContainerPruneOptions describes the options needed
|
||||||
@ -445,7 +445,7 @@ type ContainerPortOptions struct {
|
|||||||
// ContainerPortReport describes the output needed for
|
// ContainerPortReport describes the output needed for
|
||||||
// the CLI to output ports
|
// the CLI to output ports
|
||||||
type ContainerPortReport struct {
|
type ContainerPortReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Ports []nettypes.PortMapping
|
Ports []nettypes.PortMapping
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ type Image struct {
|
|||||||
HealthCheck *manifest.Schema2HealthConfig `json:",omitempty"`
|
HealthCheck *manifest.Schema2HealthConfig `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) Id() string { //nolint:revive
|
func (i *Image) Id() string {
|
||||||
return i.ID
|
return i.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package reports
|
package reports
|
||||||
|
|
||||||
type RmReport struct {
|
type RmReport struct {
|
||||||
Id string `json:"Id"` //nolint:revive
|
Id string `json:"Id"`
|
||||||
Err error `json:"Err,omitempty"`
|
Err error `json:"Err,omitempty"`
|
||||||
RawInput string `json:"-"`
|
RawInput string `json:"-"`
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package reports
|
package reports
|
||||||
|
|
||||||
type PruneReport struct {
|
type PruneReport struct {
|
||||||
Id string `json:"Id"` //nolint:revive
|
Id string `json:"Id"`
|
||||||
Err error `json:"Err,omitempty"`
|
Err error `json:"Err,omitempty"`
|
||||||
Size uint64 `json:"Size"`
|
Size uint64 `json:"Size"`
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package reports
|
package reports
|
||||||
|
|
||||||
type ScpReport struct {
|
type ScpReport struct {
|
||||||
Id string `json:"Id"` //nolint:revive
|
Id string `json:"Id"`
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ type Volume struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Report struct {
|
type Report struct {
|
||||||
Id []string //nolint:revive
|
Id []string
|
||||||
Err map[string]error
|
Err map[string]error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ type ContainerStatReport struct {
|
|||||||
|
|
||||||
type CheckpointReport struct {
|
type CheckpointReport struct {
|
||||||
Err error `json:"-"`
|
Err error `json:"-"`
|
||||||
Id string `json:"Id"` //nolint:revive
|
Id string `json:"Id"`
|
||||||
RawInput string `json:"-"`
|
RawInput string `json:"-"`
|
||||||
RuntimeDuration int64 `json:"runtime_checkpoint_duration"`
|
RuntimeDuration int64 `json:"runtime_checkpoint_duration"`
|
||||||
CRIUStatistics *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
|
CRIUStatistics *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
|
||||||
@ -22,7 +22,7 @@ type CheckpointReport struct {
|
|||||||
|
|
||||||
type RestoreReport struct {
|
type RestoreReport struct {
|
||||||
Err error `json:"-"`
|
Err error `json:"-"`
|
||||||
Id string `json:"Id"` //nolint:revive
|
Id string `json:"Id"`
|
||||||
RawInput string `json:"-"`
|
RawInput string `json:"-"`
|
||||||
RuntimeDuration int64 `json:"runtime_restore_duration"`
|
RuntimeDuration int64 `json:"runtime_restore_duration"`
|
||||||
CRIUStatistics *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
|
CRIUStatistics *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
// swagger:model LibpodImageSummary
|
// swagger:model LibpodImageSummary
|
||||||
type ImageSummary struct {
|
type ImageSummary struct {
|
||||||
ID string `json:"Id"`
|
ID string `json:"Id"`
|
||||||
ParentId string //nolint:revive
|
ParentId string
|
||||||
RepoTags []string
|
RepoTags []string
|
||||||
RepoDigests []string
|
RepoDigests []string
|
||||||
Created int64
|
Created int64
|
||||||
@ -34,7 +34,7 @@ type ImageSummary struct {
|
|||||||
Os string `json:",omitempty"`
|
Os string `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *ImageSummary) Id() string { //nolint:revive
|
func (i *ImageSummary) Id() string {
|
||||||
return i.ID
|
return i.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ type ImageLoadReport struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ImageImportReport struct {
|
type ImageImportReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImageSearchReport is the response from searching images.
|
// ImageSearchReport is the response from searching images.
|
||||||
@ -90,7 +90,7 @@ type ShowTrustReport struct {
|
|||||||
|
|
||||||
// ImageMountReport describes the response from image mount
|
// ImageMountReport describes the response from image mount
|
||||||
type ImageMountReport struct {
|
type ImageMountReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Name string
|
Name string
|
||||||
Repositories []string
|
Repositories []string
|
||||||
Path string
|
Path string
|
||||||
@ -99,7 +99,7 @@ type ImageMountReport struct {
|
|||||||
// ImageUnmountReport describes the response from umounting an image
|
// ImageUnmountReport describes the response from umounting an image
|
||||||
type ImageUnmountReport struct {
|
type ImageUnmountReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// FarmInspectReport describes the response from farm inspect
|
// FarmInspectReport describes the response from farm inspect
|
||||||
|
@ -14,7 +14,7 @@ type NetworkPruneReport struct {
|
|||||||
|
|
||||||
// NetworkReloadReport describes the results of reloading a container network.
|
// NetworkReloadReport describes the results of reloading a container network.
|
||||||
type NetworkReloadReport struct {
|
type NetworkReloadReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Err error
|
Err error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,47 +9,47 @@ import (
|
|||||||
|
|
||||||
type PodPruneReport struct {
|
type PodPruneReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodPauseReport struct {
|
type PodPauseReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
type PodUnpauseReport struct {
|
type PodUnpauseReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodStopReport struct {
|
type PodStopReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodRestartReport struct {
|
type PodRestartReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodStartReport struct {
|
type PodStartReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
RawInput string
|
RawInput string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodRmReport struct {
|
type PodRmReport struct {
|
||||||
RemovedCtrs map[string]error
|
RemovedCtrs map[string]error
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodCreateReport struct {
|
type PodCreateReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PodCloneReport struct {
|
type PodCloneReport struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodStatsReport includes pod-resource statistics data.
|
// PodStatsReport includes pod-resource statistics data.
|
||||||
@ -95,15 +95,15 @@ type PodInspectReport struct {
|
|||||||
|
|
||||||
type PodKillReport struct {
|
type PodKillReport struct {
|
||||||
Errs []error
|
Errs []error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListPodsReport struct {
|
type ListPodsReport struct {
|
||||||
Cgroup string
|
Cgroup string
|
||||||
Containers []*ListPodContainer
|
Containers []*ListPodContainer
|
||||||
Created time.Time
|
Created time.Time
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
InfraId string //nolint:revive
|
InfraId string
|
||||||
Name string
|
Name string
|
||||||
Namespace string
|
Namespace string
|
||||||
// Network names connected to infra container
|
// Network names connected to infra container
|
||||||
@ -113,7 +113,7 @@ type ListPodsReport struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ListPodContainer struct {
|
type ListPodContainer struct {
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Names string
|
Names string
|
||||||
Status string
|
Status string
|
||||||
RestartCount uint
|
RestartCount uint
|
||||||
|
@ -22,7 +22,7 @@ type VolumeCreateOptions struct {
|
|||||||
|
|
||||||
type VolumeRmReport struct {
|
type VolumeRmReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
type VolumeInspectReport struct {
|
type VolumeInspectReport struct {
|
||||||
*VolumeConfigResponse
|
*VolumeConfigResponse
|
||||||
@ -38,14 +38,14 @@ type VolumeReloadReport struct {
|
|||||||
|
|
||||||
type VolumeMountReport struct {
|
type VolumeMountReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
Name string
|
Name string
|
||||||
Path string
|
Path string
|
||||||
}
|
}
|
||||||
|
|
||||||
type VolumeUnmountReport struct {
|
type VolumeUnmountReport struct {
|
||||||
Err error
|
Err error
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
type VolumeConfigResponse struct {
|
type VolumeConfigResponse struct {
|
||||||
|
@ -86,7 +86,7 @@ func Contains(err error, sub error) bool {
|
|||||||
// PodConflictErrorModel is used in remote connections with podman
|
// PodConflictErrorModel is used in remote connections with podman
|
||||||
type PodConflictErrorModel struct {
|
type PodConflictErrorModel struct {
|
||||||
Errs []string
|
Errs []string
|
||||||
Id string //nolint:revive
|
Id string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrorModel is used in remote connections with podman
|
// ErrorModel is used in remote connections with podman
|
||||||
|
@ -26,8 +26,6 @@ func (rn ResourceName) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cpu returns the Cpu limit if specified.
|
// Cpu returns the Cpu limit if specified.
|
||||||
//
|
|
||||||
//nolint:revive
|
|
||||||
func (rl *ResourceList) Cpu() *resource.Quantity {
|
func (rl *ResourceList) Cpu() *resource.Quantity {
|
||||||
return rl.Name(ResourceCPU, resource.DecimalSI)
|
return rl.Name(ResourceCPU, resource.DecimalSI)
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ func (i *initMachine) withDiskSize(size uint) *initMachine {
|
|||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *initMachine) withIgnitionPath(path string) *initMachine { //nolint:unused
|
func (i *initMachine) withIgnitionPath(path string) *initMachine {
|
||||||
i.ignitionPath = path
|
i.ignitionPath = path
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// OSTree deals with operations on ostree based os's
|
// OSTree deals with operations on ostree based os's
|
||||||
type OSTree struct { //nolint:revive
|
type OSTree struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply takes an OCI image and does an rpm-ostree rebase on the image
|
// Apply takes an OCI image and does an rpm-ostree rebase on the image
|
||||||
|
@ -201,7 +201,7 @@ func (q *QEMUStubber) stopLocked(mc *vmconfigs.MachineConfig) error {
|
|||||||
|
|
||||||
if err := qmpMonitor.Disconnect(); err != nil {
|
if err := qmpMonitor.Disconnect(); err != nil {
|
||||||
// FIXME: this error should probably be returned
|
// FIXME: this error should probably be returned
|
||||||
return nil //nolint: nilerr
|
return nil
|
||||||
}
|
}
|
||||||
disconnected = true
|
disconnected = true
|
||||||
|
|
||||||
|
@ -6,20 +6,14 @@ func findClaimHelper() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// All of these are unused on Windows but are used on Linux.
|
|
||||||
// So we're just silencing Windows lint warnings here.
|
|
||||||
|
|
||||||
//nolint:unused
|
|
||||||
func dockerClaimHelperInstalled() bool {
|
func dockerClaimHelperInstalled() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:unused
|
|
||||||
func claimDockerSock() bool {
|
func claimDockerSock() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
//nolint:unused
|
|
||||||
func dockerClaimSupported() bool {
|
func dockerClaimSupported() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ type MachineConfig struct {
|
|||||||
QEMUHypervisor *QEMUConfig `json:",omitempty"`
|
QEMUHypervisor *QEMUConfig `json:",omitempty"`
|
||||||
WSLHypervisor *WSLConfig `json:",omitempty"`
|
WSLHypervisor *WSLConfig `json:",omitempty"`
|
||||||
|
|
||||||
lock *lockfile.LockFile //nolint:unused
|
lock *lockfile.LockFile
|
||||||
|
|
||||||
// configPath can be used for reading, writing, removing
|
// configPath can be used for reading, writing, removing
|
||||||
configPath *define.VMFile
|
configPath *define.VMFile
|
||||||
|
@ -49,7 +49,7 @@ func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
// It is still failing. We can safely remove it.
|
// It is still failing. We can safely remove it.
|
||||||
os.Remove(pausePidPath)
|
os.Remove(pausePidPath)
|
||||||
return false, -1, nil //nolint: nilerr
|
return false, -1, nil
|
||||||
}
|
}
|
||||||
return became, ret, err
|
return became, ret, err
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,6 @@ import (
|
|||||||
|
|
||||||
// KubeSeccompPaths holds information about a pod YAML's seccomp configuration
|
// KubeSeccompPaths holds information about a pod YAML's seccomp configuration
|
||||||
// it holds both container and pod seccomp paths
|
// it holds both container and pod seccomp paths
|
||||||
//
|
|
||||||
//nolint:revive
|
|
||||||
type KubeSeccompPaths struct {
|
type KubeSeccompPaths struct {
|
||||||
containerPaths map[string]string
|
containerPaths map[string]string
|
||||||
podPath string
|
podPath string
|
||||||
|
@ -25,7 +25,6 @@ const (
|
|||||||
kubeFilePermission = 0644
|
kubeFilePermission = 0644
|
||||||
)
|
)
|
||||||
|
|
||||||
//nolint:revive
|
|
||||||
type KubeVolumeType int
|
type KubeVolumeType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -40,7 +39,6 @@ const (
|
|||||||
KubeVolumeTypeImage
|
KubeVolumeTypeImage
|
||||||
)
|
)
|
||||||
|
|
||||||
//nolint:revive
|
|
||||||
type KubeVolume struct {
|
type KubeVolume struct {
|
||||||
// Type of volume to create
|
// Type of volume to create
|
||||||
Type KubeVolumeType
|
Type KubeVolumeType
|
||||||
|
@ -629,8 +629,7 @@ type SpecGenerator struct {
|
|||||||
ContainerResourceConfig
|
ContainerResourceConfig
|
||||||
ContainerHealthCheckConfig
|
ContainerHealthCheckConfig
|
||||||
|
|
||||||
//nolint:unused // this is needed for the local client but golangci-lint
|
//nolint:nolintlint,unused // "unused" complains when remote build tag is used, "nolintlint" complains otherwise.
|
||||||
// does not seems to happy when we test the remote stub
|
|
||||||
cacheLibImage
|
cacheLibImage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,14 +14,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
//nolint:revive
|
ARTIFACT_SINGLE = "quay.io/libpod/testartifact:20250206-single"
|
||||||
ARTIFACT_SINGLE = "quay.io/libpod/testartifact:20250206-single"
|
ARTIFACT_MULTI = "quay.io/libpod/testartifact:20250206-multi"
|
||||||
//nolint:revive
|
|
||||||
ARTIFACT_MULTI = "quay.io/libpod/testartifact:20250206-multi"
|
|
||||||
//nolint:revive
|
|
||||||
ARTIFACT_MULTI_NO_TITLE = "quay.io/libpod/testartifact:20250206-multi-no-title"
|
ARTIFACT_MULTI_NO_TITLE = "quay.io/libpod/testartifact:20250206-multi-no-title"
|
||||||
//nolint:revive
|
ARTIFACT_EVIL = "quay.io/libpod/testartifact:20250206-evil"
|
||||||
ARTIFACT_EVIL = "quay.io/libpod/testartifact:20250206-evil"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Podman artifact", func() {
|
var _ = Describe("Podman artifact", func() {
|
||||||
|
@ -44,10 +44,10 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
//lint:ignore ST1003
|
//lint:ignore ST1003
|
||||||
PODMAN_BINARY string //nolint:revive
|
PODMAN_BINARY string
|
||||||
INTEGRATION_ROOT string //nolint:revive
|
INTEGRATION_ROOT string
|
||||||
CGROUP_MANAGER = "systemd" //nolint:revive
|
CGROUP_MANAGER = "systemd"
|
||||||
RESTORE_IMAGES = []string{ALPINE, BB, NGINX_IMAGE} //nolint:revive
|
RESTORE_IMAGES = []string{ALPINE, BB, NGINX_IMAGE}
|
||||||
defaultWaitTimeout = 90
|
defaultWaitTimeout = 90
|
||||||
CGROUPSV2, _ = cgroups.IsCgroup2UnifiedMode()
|
CGROUPSV2, _ = cgroups.IsCgroup2UnifiedMode()
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
package integration
|
package integration
|
||||||
|
|
||||||
var (
|
var (
|
||||||
REDIS_IMAGE = "quay.io/libpod/redis:alpine" //nolint:revive
|
REDIS_IMAGE = "quay.io/libpod/redis:alpine"
|
||||||
fedoraMinimal = "quay.io/libpod/systemd-image:20240124"
|
fedoraMinimal = "quay.io/libpod/systemd-image:20240124"
|
||||||
ALPINE = "quay.io/libpod/alpine:latest"
|
ALPINE = "quay.io/libpod/alpine:latest"
|
||||||
ALPINELISTTAG = "quay.io/libpod/alpine:3.10.2"
|
ALPINELISTTAG = "quay.io/libpod/alpine:3.10.2"
|
||||||
@ -12,9 +12,9 @@ var (
|
|||||||
ALPINEAMD64ID = "961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
|
ALPINEAMD64ID = "961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
|
||||||
ALPINEARM64DIGEST = "quay.io/libpod/alpine@sha256:f270dcd11e64b85919c3bab66886e59d677cf657528ac0e4805d3c71e458e525"
|
ALPINEARM64DIGEST = "quay.io/libpod/alpine@sha256:f270dcd11e64b85919c3bab66886e59d677cf657528ac0e4805d3c71e458e525"
|
||||||
ALPINEARM64ID = "915beeae46751fc564998c79e73a1026542e945ca4f73dc841d09ccc6c2c0672"
|
ALPINEARM64ID = "915beeae46751fc564998c79e73a1026542e945ca4f73dc841d09ccc6c2c0672"
|
||||||
INFRA_IMAGE = "quay.io/libpod/k8s-pause:3.5" //nolint:revive
|
INFRA_IMAGE = "quay.io/libpod/k8s-pause:3.5"
|
||||||
BB = "quay.io/libpod/busybox:latest"
|
BB = "quay.io/libpod/busybox:latest"
|
||||||
HEALTHCHECK_IMAGE = "quay.io/libpod/alpine_healthcheck:latest" //nolint:revive
|
HEALTHCHECK_IMAGE = "quay.io/libpod/alpine_healthcheck:latest"
|
||||||
volumeTest = "quay.io/libpod/volume-plugin-test-img:20220623"
|
volumeTest = "quay.io/libpod/volume-plugin-test-img:20220623"
|
||||||
|
|
||||||
// ImageCacheDir is initialized at runtime.
|
// ImageCacheDir is initialized at runtime.
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
package integration
|
package integration
|
||||||
|
|
||||||
var (
|
var (
|
||||||
STORAGE_FS = "overlay" //nolint:revive
|
STORAGE_FS = "overlay"
|
||||||
STORAGE_OPTIONS = "--storage-driver overlay" //nolint:revive
|
STORAGE_OPTIONS = "--storage-driver overlay"
|
||||||
ROOTLESS_STORAGE_FS = "overlay" //nolint:revive
|
ROOTLESS_STORAGE_FS = "overlay"
|
||||||
CACHE_IMAGES = []string{ALPINE, BB, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, CITEST_IMAGE, HEALTHCHECK_IMAGE, SYSTEMD_IMAGE} //nolint:revive
|
CACHE_IMAGES = []string{ALPINE, BB, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, CITEST_IMAGE, HEALTHCHECK_IMAGE, SYSTEMD_IMAGE}
|
||||||
NGINX_IMAGE = "quay.io/libpod/alpine_nginx:latest" //nolint:revive
|
NGINX_IMAGE = "quay.io/libpod/alpine_nginx:latest"
|
||||||
BB_GLIBC = "docker.io/library/busybox:glibc" //nolint:revive
|
BB_GLIBC = "docker.io/library/busybox:glibc"
|
||||||
REGISTRY_IMAGE = "quay.io/libpod/registry:2.8.2" //nolint:revive
|
REGISTRY_IMAGE = "quay.io/libpod/registry:2.8.2"
|
||||||
CITEST_IMAGE = "quay.io/libpod/testimage:20241011" //nolint:revive
|
CITEST_IMAGE = "quay.io/libpod/testimage:20241011"
|
||||||
SYSTEMD_IMAGE = "quay.io/libpod/systemd-image:20240124" //nolint:revive
|
SYSTEMD_IMAGE = "quay.io/libpod/systemd-image:20240124"
|
||||||
CIRROS_IMAGE = "quay.io/libpod/cirros:latest" //nolint:revive
|
CIRROS_IMAGE = "quay.io/libpod/cirros:latest"
|
||||||
)
|
)
|
||||||
|
@ -20,9 +20,9 @@ import (
|
|||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo/v2" //nolint:revive
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega" //nolint:revive
|
. "github.com/onsi/gomega"
|
||||||
. "github.com/onsi/gomega/gexec" //nolint:revive
|
. "github.com/onsi/gomega/gexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NetworkBackend int
|
type NetworkBackend int
|
||||||
|
Reference in New Issue
Block a user