Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run codespell on code #5297

Merged
merged 1 commit into from Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -123,7 +123,7 @@ gopath:
test $(shell pwd) = $(shell cd ../../../../src/github.com/containers/buildah ; pwd)

codespell:
codespell -S Makefile,buildah.spec.rpkg,AUTHORS,bin,vendor,.git,go.mod,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej" -L passt,bu,uint,iff,od,erro -w
codespell -S Makefile,buildah.spec.rpkg,AUTHORS,bin,vendor,.git,go.mod,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej" -L secon,passt,bu,uint,iff,od,erro -w

.PHONY: validate
validate: install.tools
Expand Down
2 changes: 1 addition & 1 deletion commit.go
Expand Up @@ -119,7 +119,7 @@ type CommitOptions struct {
// OverrideConfig is applied.
OverrideChanges []string
// ExtraImageContent is a map which describes additional content to add
// to the committted image. The map's keys are filesystem paths in the
// to the committed image. The map's keys are filesystem paths in the
// image and the corresponding values are the paths of files whose
// contents will be used in their place. The contents will be owned by
// 0:0 and have mode 0644. Currently only accepts regular files.
Expand Down
2 changes: 1 addition & 1 deletion docs/buildah-build.1.md
Expand Up @@ -800,7 +800,7 @@ environment variable. `export BUILDAH_RUNTIME=/usr/bin/crun`

**--runtime-flag** *flag*

Adds global flags for the container rutime. To list the supported flags, please
Adds global flags for the container runtime. To list the supported flags, please
consult the manpages of the selected container runtime.

Note: Do not pass the leading `--` to the flag. To pass the runc flag `--log-format json`
Expand Down
2 changes: 1 addition & 1 deletion imagebuildah/executor.go
Expand Up @@ -494,7 +494,7 @@ func (b *Executor) buildStage(ctx context.Context, cleanupStages map[int]*StageE
// to the Dockerfile that would provide the same result.
// Reason: Docker adds label modification as a last step which can be
// processed like regular steps, and if no modification is done to
// layers, its easier to re-use cached layers.
// layers, its easier to reuse cached layers.
if len(b.labels) > 0 {
var labelLine string
labels := append([]string{}, b.labels...)
Expand Down
2 changes: 1 addition & 1 deletion imagebuildah/stage_executor.go
Expand Up @@ -1524,7 +1524,7 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
}
}

// Note: If the build has squash, we must try to re-use as many layers as possible if cache is found.
// Note: If the build has squash, we must try to reuse as many layers as possible if cache is found.
// So only perform commit if it's the lastInstruction of lastStage.
if cacheID != "" {
logCacheHit(cacheID)
Expand Down
8 changes: 4 additions & 4 deletions tests/bud.bats
Expand Up @@ -969,7 +969,7 @@ FROM one
RUN echo "target stage"
_EOF

# with --skip-unused-stages=true no warning should be printed since ARG is decalred in stage which is not used
# with --skip-unused-stages=true no warning should be printed since ARG is declared in stage which is not used
run_buildah build $WITH_POLICY_JSON --skip-unused-stages=true -t source -f $contextdir/Dockerfile
expect_output --substring "needed stage"
expect_output --substring "target stage"
Expand Down Expand Up @@ -1984,7 +1984,7 @@ _EOF
# Reuse cached layers and check if --output still works as expected
run_buildah build --output type=local,dest=$mytmpdir/rootfs $WITH_POLICY_JSON -t test-bud -f $mytmpdir/Containerfile .
ls $mytmpdir/rootfs
# exported rootfs must contain only 'target' from last/final stage and not contain file `rouge` from first stage
# exported rootfs must contain only 'target' from last/final stage and not contain file `rogue` from first stage
expect_output --substring 'target'
# must not contain rogue from first stage
assert "$output" =~ "rogue"
Expand All @@ -2005,7 +2005,7 @@ _EOF
# Reuse cached layers and check if --output still works as expected
run_buildah build --output type=local,dest=$mytmpdir/rootfs $WITH_POLICY_JSON -t test-bud -f $mytmpdir/Containerfile .
ls $mytmpdir/rootfs
# exported rootfs must contain only 'rouge' even if build from cache.
# exported rootfs must contain only 'rogue' even if build from cache.
expect_output --substring 'rogue'
}

Expand Down Expand Up @@ -4615,7 +4615,7 @@ EOF
# Build first in Docker format. Whether we do OCI or Docker first shouldn't matter, so we picked one.
run_buildah build --iidfile ${TEST_SCRATCH_DIR}/first-docker --format docker --layers --quiet $WITH_POLICY_JSON $BUDFILES/cache-format

# Build in OCI format. Cache should not re-use the same images, so we should get a different image ID.
# Build in OCI format. Cache should not reuse the same images, so we should get a different image ID.
run_buildah build --iidfile ${TEST_SCRATCH_DIR}/first-oci --format oci --layers --quiet $WITH_POLICY_JSON $BUDFILES/cache-format

# Build in Docker format again. Cache traversal should 100% hit the Docker image, so we should get its image ID.
Expand Down