Skip to content

Commit cfe8024

Browse files
committed
ci: add codespell
1. Move codespell config out of Makefile, simplify (remove unused stuff). 2. Fix found issues (using codespell -w). 3. Add a codespell CI job. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 14d1fce commit cfe8024

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

.cirrus.yml

+8
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ gofix_task:
180180
build_script: go fix ./...
181181
test_script: git diff --exit-code
182182

183+
codespell_task:
184+
alias: codespell
185+
container:
186+
image: python
187+
build_script: pip install codespell
188+
test_script: codespell
189+
183190

184191
# Status aggregator for all tests. This task simply ensures a defined
185192
# set of tasks all passed, and allows confirming that based on the status
@@ -197,6 +204,7 @@ success_task:
197204
- vendor
198205
- cross
199206
- gofix
207+
- codespell
200208
container:
201209
image: golang:1.21
202210
clone_script: 'mkdir -p "$CIRRUS_WORKING_DIR"' # Source code not needed

.codespellrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
skip = ./.git,./vendor,./tests/tools/vendor,AUTHORS
3+
ignore-words-list = afile,flate,prevend,Plack,worl

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ containers-storage: ## build using gc on the host
4646
$(GO) build -compiler gc $(BUILDFLAGS) ./cmd/containers-storage
4747

4848
codespell:
49-
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 plack,worl,flate,uint,iff,od,ERRO -w
49+
codespell
5050

5151
binary local-binary: containers-storage
5252

pkg/chunked/cache_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (c *layersCache) load() error {
274274
var newLayers []*layer
275275
for _, r := range allLayers {
276276
// The layer is present in the store and it is already loaded. Attempt to
277-
// re-use it if mmap'ed.
277+
// reuse it if mmap'ed.
278278
if l, found := loadedLayers[r.ID]; found {
279279
// If the layer is not marked for re-load, move it to newLayers.
280280
if !l.reloadWithMmap {

pkg/idtools/idtools.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ func checkChownErr(err error, name string, uid, gid int) error {
367367
return err
368368
}
369369

370-
// Stat contains file states that can be overriden with ContainersOverrideXattr.
370+
// Stat contains file states that can be overridden with ContainersOverrideXattr.
371371
type Stat struct {
372372
IDs IDPair
373373
Mode os.FileMode

0 commit comments

Comments
 (0)