mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
Fixes from make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -149,7 +149,7 @@ err_if_empty = $(if $(strip $($(1))),$(strip $($(1))),$(error Required variable
|
|||||||
|
|
||||||
# Podman does not work w/o CGO_ENABLED, except in some very specific cases
|
# Podman does not work w/o CGO_ENABLED, except in some very specific cases
|
||||||
CGO_ENABLED ?= 1
|
CGO_ENABLED ?= 1
|
||||||
# Default to the native OS type and archetecture unless otherwise specified
|
# Default to the native OS type and architecture unless otherwise specified
|
||||||
GOOS ?= $(shell $(GO) env GOOS)
|
GOOS ?= $(shell $(GO) env GOOS)
|
||||||
ifeq ($(call err_if_empty,GOOS),windows)
|
ifeq ($(call err_if_empty,GOOS),windows)
|
||||||
BINSFX := .exe
|
BINSFX := .exe
|
||||||
@@ -255,7 +255,7 @@ test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go)
|
|||||||
|
|
||||||
.PHONY: codespell
|
.PHONY: codespell
|
||||||
codespell:
|
codespell:
|
||||||
codespell -S bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L uint,iff,od,seeked,splitted,marge,ERRO,hist -w
|
codespell -S bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L uint,iff,od,seeked,splitted,marge,ERRO,hist,ether -w
|
||||||
|
|
||||||
.PHONY: validate
|
.PHONY: validate
|
||||||
validate: gofmt lint .gitvalidation validate.completions man-page-check swagger-check tests-included
|
validate: gofmt lint .gitvalidation validate.completions man-page-check swagger-check tests-included
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ spelled with complete minutiae.
|
|||||||
1. Merge the PR (or ask someone else to review and merge, to be safer).
|
1. Merge the PR (or ask someone else to review and merge, to be safer).
|
||||||
1. **Note:** This is the last point where any test-failures can be addressed
|
1. **Note:** This is the last point where any test-failures can be addressed
|
||||||
by code changes. After pushing the new version-tag upstream, no further
|
by code changes. After pushing the new version-tag upstream, no further
|
||||||
changes can be made to the code without lots of unpleasent efforts. Please
|
changes can be made to the code without lots of unpleasant efforts. Please
|
||||||
seek assistance if needed, before proceeding.
|
seek assistance if needed, before proceeding.
|
||||||
|
|
||||||
1. Assuming the "Bump to ..." PR merged successfully, and you're **really**
|
1. Assuming the "Bump to ..." PR merged successfully, and you're **really**
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ func init() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Name shouldnt be required, need to create a default vm
|
// TODO Name shouldn't be required, need to create a default vm
|
||||||
func stop(cmd *cobra.Command, args []string) error {
|
func stop(cmd *cobra.Command, args []string) error {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Register-ArgumentCompleter -CommandName 'podman-remote' -ScriptBlock {
|
|||||||
|
|
||||||
$Values | ForEach-Object {
|
$Values | ForEach-Object {
|
||||||
|
|
||||||
# store temporay because switch will overwrite $_
|
# store temporary because switch will overwrite $_
|
||||||
$comp = $_
|
$comp = $_
|
||||||
|
|
||||||
# PowerShell supports three different completion modes
|
# PowerShell supports three different completion modes
|
||||||
@@ -216,7 +216,7 @@ Register-ArgumentCompleter -CommandName 'podman-remote' -ScriptBlock {
|
|||||||
Default {
|
Default {
|
||||||
# Like MenuComplete but we don't want to add a space here because
|
# Like MenuComplete but we don't want to add a space here because
|
||||||
# the user need to press space anyway to get the completion.
|
# the user need to press space anyway to get the completion.
|
||||||
# Description will not be shown because thats not possible with TabCompleteNext
|
# Description will not be shown because that's not possible with TabCompleteNext
|
||||||
[System.Management.Automation.CompletionResult]::new($($comp.Name | __podman-remote_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __podman-remote_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock {
|
|||||||
|
|
||||||
$Values | ForEach-Object {
|
$Values | ForEach-Object {
|
||||||
|
|
||||||
# store temporay because switch will overwrite $_
|
# store temporary because switch will overwrite $_
|
||||||
$comp = $_
|
$comp = $_
|
||||||
|
|
||||||
# PowerShell supports three different completion modes
|
# PowerShell supports three different completion modes
|
||||||
@@ -216,7 +216,7 @@ Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock {
|
|||||||
Default {
|
Default {
|
||||||
# Like MenuComplete but we don't want to add a space here because
|
# Like MenuComplete but we don't want to add a space here because
|
||||||
# the user need to press space anyway to get the completion.
|
# the user need to press space anyway to get the completion.
|
||||||
# Description will not be shown because thats not possible with TabCompleteNext
|
# Description will not be shown because that's not possible with TabCompleteNext
|
||||||
[System.Management.Automation.CompletionResult]::new($($comp.Name | __podman_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __podman_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ logformatter() {
|
|||||||
|& awk --file "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk" \
|
|& awk --file "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk" \
|
||||||
|& "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/logformatter" "$output_name"
|
|& "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/logformatter" "$output_name"
|
||||||
else
|
else
|
||||||
# Assume script is run by a human, they want output immediatly
|
# Assume script is run by a human, they want output immediately
|
||||||
cat -
|
cat -
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ PLATFORM=$1 ## linux, windows or darwin
|
|||||||
TARGET=${2} ## where to output files
|
TARGET=${2} ## where to output files
|
||||||
SOURCES=${@:3} ## directories to find markdown files
|
SOURCES=${@:3} ## directories to find markdown files
|
||||||
|
|
||||||
# Overriden for testing. Native podman-remote binary expected filepaths
|
# Overridden for testing. Native podman-remote binary expected filepaths
|
||||||
if [[ -z "$PODMAN" ]]; then
|
if [[ -z "$PODMAN" ]]; then
|
||||||
case $(env -i HOME=$HOME PATH=$PATH go env GOOS) in
|
case $(env -i HOME=$HOME PATH=$PATH go env GOOS) in
|
||||||
windows)
|
windows)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ A secret is a blob of sensitive data which a container needs at runtime but
|
|||||||
should not be stored in the image or in source control, such as usernames and passwords,
|
should not be stored in the image or in source control, such as usernames and passwords,
|
||||||
TLS certificates and keys, SSH keys or other important generic strings or binary content (up to 500 kb in size).
|
TLS certificates and keys, SSH keys or other important generic strings or binary content (up to 500 kb in size).
|
||||||
|
|
||||||
Secrets will not be commited to an image with `podman commit`, and will not be in the archive created by a `podman export`
|
Secrets will not be committed to an image with `podman commit`, and will not be in the archive created by a `podman export`
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
|||||||
@@ -1313,7 +1313,7 @@ func (c *Container) stop(timeout uint) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We have to check stopErr *after* we lock again - otherwise, we have a
|
// We have to check stopErr *after* we lock again - otherwise, we have a
|
||||||
// change of panicing on a double-unlock. Ref: GH Issue 9615
|
// change of panicking on a double-unlock. Ref: GH Issue 9615
|
||||||
if stopErr != nil {
|
if stopErr != nil {
|
||||||
return stopErr
|
return stopErr
|
||||||
}
|
}
|
||||||
@@ -1676,7 +1676,7 @@ func (c *Container) chownVolume(volumeName string) error {
|
|||||||
|
|
||||||
// TODO: For now, I've disabled chowning volumes owned by non-Podman
|
// TODO: For now, I've disabled chowning volumes owned by non-Podman
|
||||||
// drivers. This may be safe, but it's really going to be a case-by-case
|
// drivers. This may be safe, but it's really going to be a case-by-case
|
||||||
// thing, I think - safest to leave disabled now and reenable later if
|
// thing, I think - safest to leave disabled now and re-enable later if
|
||||||
// there is a demand.
|
// there is a demand.
|
||||||
if vol.state.NeedsChown && !vol.UsesVolumeDriver() {
|
if vol.state.NeedsChown && !vol.UsesVolumeDriver() {
|
||||||
vol.state.NeedsChown = false
|
vol.state.NeedsChown = false
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FileInfo describes the attributes of a file or diretory.
|
// FileInfo describes the attributes of a file or directory.
|
||||||
type FileInfo struct {
|
type FileInfo struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Size int64 `json:"size"`
|
Size int64 `json:"size"`
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
|
|||||||
|
|
||||||
// If more then one candidate and the candidates all have same name
|
// If more then one candidate and the candidates all have same name
|
||||||
// and only one is read/write return it.
|
// and only one is read/write return it.
|
||||||
// Othewise return error with the list of candidates
|
// Otherwise return error with the list of candidates
|
||||||
if len(candidates) > 1 {
|
if len(candidates) > 1 {
|
||||||
var (
|
var (
|
||||||
rwImage *Image
|
rwImage *Image
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ var (
|
|||||||
stopped bool
|
stopped bool
|
||||||
sigChan chan os.Signal
|
sigChan chan os.Signal
|
||||||
cancelChan chan bool
|
cancelChan chan bool
|
||||||
// Syncronize accesses to the map
|
// Synchronize accesses to the map
|
||||||
handlerLock sync.Mutex
|
handlerLock sync.Mutex
|
||||||
// Definitions of all on-shutdown handlers
|
// Definitions of all on-shutdown handlers
|
||||||
handlers map[string]func(os.Signal) error
|
handlers map[string]func(os.Signal) error
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ func WaitContainerDocker(w http.ResponseWriter, r *http.Request) {
|
|||||||
exitCode, err := waitDockerCondition(ctx, name, interval, condition)
|
exitCode, err := waitDockerCondition(ctx, name, interval, condition)
|
||||||
msg := ""
|
msg := ""
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("error while waiting on condtion: %q", err)
|
logrus.Errorf("error while waiting on condition: %q", err)
|
||||||
msg = err.Error()
|
msg = err.Error()
|
||||||
}
|
}
|
||||||
responseData := handlers.ContainerWaitOKBody{
|
responseData := handlers.ContainerWaitOKBody{
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ func readConfigMapFromFile(r io.Reader) (v1.ConfigMap, error) {
|
|||||||
return cm, nil
|
return cm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// splitMultiDocYAML reads mutiple documents in a YAML file and
|
// splitMultiDocYAML reads multiple documents in a YAML file and
|
||||||
// returns them as a list.
|
// returns them as a list.
|
||||||
func splitMultiDocYAML(yamlContent []byte) ([][]byte, error) {
|
func splitMultiDocYAML(yamlContent []byte) ([][]byte, error) {
|
||||||
var documentList [][]byte
|
var documentList [][]byte
|
||||||
@@ -471,7 +471,7 @@ func getKubeKind(obj []byte) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sortKubeKinds adds the correct creation order for the kube kinds.
|
// sortKubeKinds adds the correct creation order for the kube kinds.
|
||||||
// Any pod dependecy will be created first like volumes, secrets, etc.
|
// Any pod dependency will be created first like volumes, secrets, etc.
|
||||||
func sortKubeKinds(documentList [][]byte) ([][]byte, error) {
|
func sortKubeKinds(documentList [][]byte) ([][]byte, error) {
|
||||||
var sortedDocumentList [][]byte
|
var sortedDocumentList [][]byte
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ func Decompress(localPath, uncompressedPath string) error {
|
|||||||
|
|
||||||
// Will error out if file without .xz already exists
|
// Will error out if file without .xz already exists
|
||||||
// Maybe extracting then renameing is a good idea here..
|
// Maybe extracting then renameing is a good idea here..
|
||||||
// depends on xz: not pre-installed on mac, so it becomes a brew dependecy
|
// depends on xz: not pre-installed on mac, so it becomes a brew dependency
|
||||||
func decompressXZ(src string, output io.Writer) error {
|
func decompressXZ(src string, output io.Writer) error {
|
||||||
fmt.Println("Extracting compressed file")
|
fmt.Println("Extracting compressed file")
|
||||||
cmd := exec.Command("xzcat", "-k", src)
|
cmd := exec.Command("xzcat", "-k", src)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func ToPodGen(ctx context.Context, podName string, podYAML *v1.PodTemplateSpec)
|
|||||||
}
|
}
|
||||||
p.DNSServer = servers
|
p.DNSServer = servers
|
||||||
}
|
}
|
||||||
// search domans
|
// search domains
|
||||||
if domains := dnsConfig.Searches; len(domains) > 0 {
|
if domains := dnsConfig.Searches; len(domains) > 0 {
|
||||||
p.DNSSearch = domains
|
p.DNSSearch = domains
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ func TestEscapeSystemdArguments(t *testing.T) {
|
|||||||
[]string{"foo", `"command with backslash \\"`},
|
[]string{"foo", `"command with backslash \\"`},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
[]string{"foo", `command with two backslashs \\`},
|
[]string{"foo", `command with two backslashes \\`},
|
||||||
[]string{"foo", `"command with two backslashs \\\\"`},
|
[]string{"foo", `"command with two backslashes \\\\"`},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ func PrepareFilters(r *http.Request) (*map[string][]string, error) {
|
|||||||
return &filterMap, nil
|
return &filterMap, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MatchLabelFilters matches labels and returs true if they are valid
|
// MatchLabelFilters matches labels and returns true if they are valid
|
||||||
func MatchLabelFilters(filterValues []string, labels map[string]string) bool {
|
func MatchLabelFilters(filterValues []string, labels map[string]string) bool {
|
||||||
outer:
|
outer:
|
||||||
for _, filterValue := range filterValues {
|
for _, filterValue := range filterValues {
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ class TestApi(unittest.TestCase):
|
|||||||
self.assertEqual(r.status_code, 200, r.text)
|
self.assertEqual(r.status_code, 200, r.text)
|
||||||
objs = json.loads(r.text)
|
objs = json.loads(r.text)
|
||||||
self.assertIn(type(objs), (list,))
|
self.assertIn(type(objs), (list,))
|
||||||
# There should be only one offical image
|
# There should be only one official image
|
||||||
self.assertEqual(len(objs), 1)
|
self.assertEqual(len(objs), 1)
|
||||||
|
|
||||||
def do_search4():
|
def do_search4():
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ load helpers
|
|||||||
@test "podman stop - unlock while waiting for timeout" {
|
@test "podman stop - unlock while waiting for timeout" {
|
||||||
# Test that the container state transitions to "stopping" and that other
|
# Test that the container state transitions to "stopping" and that other
|
||||||
# commands can get the container's lock. To do that, run a container that
|
# commands can get the container's lock. To do that, run a container that
|
||||||
# ingores SIGTERM such that the Podman would wait 20 seconds for the stop
|
# ignores SIGTERM such that the Podman would wait 20 seconds for the stop
|
||||||
# to finish. This gives us enough time to try some commands and inspect
|
# to finish. This gives us enough time to try some commands and inspect
|
||||||
# the container's status.
|
# the container's status.
|
||||||
|
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ Cmd[1] | $s_echo
|
|||||||
WorkingDir | $workdir
|
WorkingDir | $workdir
|
||||||
Labels.$label_name | $label_value
|
Labels.$label_name | $label_value
|
||||||
"
|
"
|
||||||
# FIXME: 2021-02-24: Fixed in buildah #3036; reenable this once podman
|
# FIXME: 2021-02-24: Fixed in buildah #3036; re-enable this once podman
|
||||||
# vendors in a newer buildah!
|
# vendors in a newer buildah!
|
||||||
# Labels.\"io.buildah.version\" | $buildah_version
|
# Labels.\"io.buildah.version\" | $buildah_version
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user