Skip to content

Commit

Permalink
Run codespell on code
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Jan 21, 2022
1 parent d1c00d5 commit 86dd22e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ sources := $(wildcard *.go cmd/containers-storage/*.go drivers/*.go drivers/*/*.
containers-storage: $(sources) ## build using gc on the host
$(GO) build $(MOD_VENDOR) -compiler gc $(BUILDFLAGS) ./cmd/containers-storage

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

binary local-binary: containers-storage

local-gccgo: ## build using gccgo on the host
Expand Down
2 changes: 1 addition & 1 deletion pkg/chunked/compression.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func readEstargzChunkedManifest(blobStream ImageSourceSeekable, blobSize int64,
- 2 bytes Extra: SI1 = 'S', SI2 = 'G'
- 2 bytes Extra: LEN = 22 (16 hex digits + len("STARGZ"))
- 22 bytes Extra: subfield = fmt.Sprintf("%016xSTARGZ", offsetOfTOC)
- 5 bytes flate header: BFINAL = 1(last block), BTYPE = 0(non-compressed block), LEN = 0
- 5 bytes flat header: BFINAL = 1(last block), BTYPE = 0(non-compressed block), LEN = 0
- 8 bytes gzip footer
*/
tocOffset, err := strconv.ParseInt(string(footer[16:16+22-6]), 16, 64)
Expand Down
2 changes: 1 addition & 1 deletion pkg/pools/pools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestBufioWriterPoolPutAndGet(t *testing.T) {
// recover it
defer func() {
if r := recover(); r == nil {
t.Fatal("Trying to flush the writter should have 'paniced', did not.")
t.Fatal("Trying to flush the writer should have 'paniced', did not.")
}
}()
writer.Flush()
Expand Down
2 changes: 1 addition & 1 deletion store.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ func GetStore(options types.StoreOptions) (Store, error) {
storesLock.Lock()
defer storesLock.Unlock()

// return if BOTH run and graph root are matched, otherwise our run-root can be overriden if the graph is found first
// return if BOTH run and graph root are matched, otherwise our run-root can be overridden if the graph is found first
for _, s := range stores {
if (s.graphRoot == options.GraphRoot) && (s.runRoot == options.RunRoot) && (options.GraphDriverName == "" || s.graphDriverName == options.GraphDriverName) {
return s, nil
Expand Down
4 changes: 2 additions & 2 deletions types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) {
}
}

// Clear storeOptions of previos settings
// Clear storeOptions of previous settings
*storeOptions = StoreOptions{}
if config.Storage.Driver != "" {
storeOptions.GraphDriverName = config.Storage.Driver
Expand Down Expand Up @@ -443,7 +443,7 @@ func Save(conf TomlConfig, rootless bool) error {
return toml.NewEncoder(f).Encode(conf)
}

// StorageConfig is used to retreive the storage.conf toml in order to overwrite it
// StorageConfig is used to retrieve the storage.conf toml in order to overwrite it
func StorageConfig(rootless bool) (*TomlConfig, error) {
config := new(TomlConfig)

Expand Down

0 comments on commit 86dd22e

Please sign in to comment.