Skip to content

Commit 40168a3

Browse files
authored
Merge pull request #139 from yarikoptic/enh-codespell
codespell: workflow, config, typos fixed
2 parents 27b6bc1 + 18e7764 commit 40168a3

File tree

13 files changed

+37
-14
lines changed

13 files changed

+37
-14
lines changed

.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[codespell]
2+
skip = .git,*.pdf,*.svg,*.sum,*.mod
3+
#
4+
# ignore-words-list =

.github/workflows/codespell.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Codespell
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
codespell:
12+
name: Check for spelling errors
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
- name: Codespell
19+
uses: codespell-project/actions-codespell@v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ EOF
149149
```
150150

151151
Assuming this specification has been generated and is available in either
152-
`/etc/cdi` or `/var/run/cdi` (or whereever a CDI-enabled consumer is configured
152+
`/etc/cdi` or `/var/run/cdi` (or wherever a CDI-enabled consumer is configured
153153
to read CDI specifications from), the devices can be accessed through their
154154
fully-qualified device names.
155155

SPEC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This is CDI **spec** version **0.6.0**.
1515
Any modifications to the **spec** will result in at least a minor version bump. When releasing changes
1616
that only affect the API also implemented in this repository, the patch version will be bumped.
1717

18-
*Note*: The **spec** is still under active development and there exists the posibility of breaking changes being
18+
*Note*: The **spec** is still under active development and there exists the possibility of breaking changes being
1919
introduced with new versions.
2020
### Released versions
2121

@@ -72,7 +72,7 @@ For the purposes of this proposal, we define the following terms:
7272
- _container runtime_ which refers to the higher level component users tend to interact with for managing containers. It may also include lower level components that implement management of containers and pods (sets of containers). e.g: docker, podman, ...
7373
- _container runtime interface integration_ which refers to a server that implements the Container Runtime Interface (CRI) services, e.g: containerd+cri, cri-o, ...
7474

75-
The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optonal" are used as specified in [RFC 2119][rfc-2119].
75+
The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optional" are used as specified in [RFC 2119][rfc-2119].
7676

7777
[rfc-2119]: https://www.ietf.org/rfc/rfc2119.txt
7878

cmd/cdi/cmd/resolve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func resolveDevices(ociSpecFiles ...string) error {
5757
5858
resolved, err := cdi.ResolveDevices(ociSpec)
5959
if err != nil {
60-
return errors.Wrapf(err, "CDI device resolution faile in %q",
60+
return errors.Wrapf(err, "CDI device resolution failed in %q",
6161
ociSpecFile)
6262
}
6363

pkg/cdi/annotations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func AnnotationKey(pluginName, deviceID string) (string, error) {
113113
case parser.IsAlphaNumeric(c):
114114
case c == '_' || c == '-' || c == '.':
115115
default:
116-
return "", fmt.Errorf("invalid name %q, invalid charcter '%c'",
116+
return "", fmt.Errorf("invalid name %q, invalid character '%c'",
117117
name, c)
118118
}
119119
}

pkg/cdi/container-edits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (d *DeviceNode) Validate() error {
238238
}
239239
for _, bit := range d.Permissions {
240240
if bit != 'r' && bit != 'w' && bit != 'm' {
241-
return fmt.Errorf("device %q: invalid persmissions %q",
241+
return fmt.Errorf("device %q: invalid permissions %q",
242242
d.Path, d.Permissions)
243243
}
244244
}

pkg/cdi/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
// were loaded from. The later a directory occurs in the list of CDI
138138
// directories to scan, the higher priority Spec files loaded from that
139139
// directory are assigned to. When two or more Spec files define the
140-
// same device, conflict is resolved by chosing the definition from the
140+
// same device, conflict is resolved by choosing the definition from the
141141
// Spec file with the highest priority.
142142
//
143143
// The default CDI directory configuration is chosen to encourage
@@ -197,7 +197,7 @@
197197
// return registry.SpecDB().WriteSpec(spec, specName)
198198
// }
199199
//
200-
// Similary, generating and later cleaning up transient Spec files can be
200+
// Similarly, generating and later cleaning up transient Spec files can be
201201
// done with code fragments similar to the following. These transient Spec
202202
// files are temporary Spec files with container-specific parametrization.
203203
// They are typically created before the associated container is created

pkg/cdi/qualified-device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
//
3030
// 'A'-'Z', 'a'-'z', '0'-'9', '.', '-', '_'.
3131
//
32-
// A valid device name may containe the following runes:
32+
// A valid device name may contain the following runes:
3333
//
3434
// 'A'-'Z', 'a'-'z', '0'-'9', '-', '_', '.', ':'
3535
//

pkg/cdi/spec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (s *Spec) validate() (map[string]*Device, error) {
209209

210210
minVersion, err := MinimumRequiredVersion(s.Spec)
211211
if err != nil {
212-
return nil, fmt.Errorf("could not determine minumum required version: %v", err)
212+
return nil, fmt.Errorf("could not determine minimum required version: %v", err)
213213
}
214214
if newVersion(minVersion).IsGreaterThan(newVersion(s.Version)) {
215215
return nil, fmt.Errorf("the spec version must be at least v%v", minVersion)
@@ -311,7 +311,7 @@ func GenerateSpecName(vendor, class string) string {
311311
// match the vendor and class of the CDI Spec. transientID should be
312312
// unique among all CDI users on the same host that might generate
313313
// transient Spec files using the same vendor/class combination. If
314-
// the external entity to which the lifecycle of the tranient Spec
314+
// the external entity to which the lifecycle of the transient Spec
315315
// is tied to has a unique ID of its own, then this is usually a
316316
// good choice for transientID.
317317
//

0 commit comments

Comments
 (0)