From 97580111bb24b4da2dd84f5d7fe57176ee189a02 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sun, 9 Mar 2025 20:42:59 -0700 Subject: [PATCH 1/2] ci: add codespell job, fix existing issues Signed-off-by: Kir Kolyshkin --- .codespellrc | 3 +++ .github/workflows/lint.yml | 9 +++++++++ ChangeLog | 17 ++++++++--------- config-vm.md | 4 ++-- specs-go/config.go | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..8bc6d252d --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +# Those should always be in lowercase! +ignore-words-list = clos diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fd0252ea5..5c30099ea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,3 +12,12 @@ jobs: run: make -C schema fmt - name: Check for changes run: git diff --exit-code + + codespell: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: install deps + run: pip install --break-system-packages codespell==v2.4.1 + - name: run codespell + run: codespell diff --git a/ChangeLog b/ChangeLog index bf2807f3f..f53939af0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -230,7 +230,7 @@ Changes with v1.0.1: * config-linux: More specific documentation for weightDevice and throttle* (#825) * config-linux: Modify procfs to proc (#905) - * config-linux: Fix "psuedo" -> "pseudo" typo (#921) + * config-linux: Fix a typo (#921) * config-windows: Make maximum a uint16 (was a uint) (#891) * runtime: Change "process in the container" -> "container process" (#907) @@ -490,7 +490,7 @@ Changes with v1.0.0-rc3: * spec: Separate the spec from project scaffolding (#626) * README: Define "unspecified", "undefined", and "implementation-defined" (#575) - * config: Clarify absolue and relative values for root.path (#558) + * config: Clarify absolute and relative values for root.path (#558) * config: Clarify ociVersion covering the configuration <-> runtime API (#523) * config-linux: Forbid duplicated namespaces with same `type` @@ -551,7 +551,7 @@ Changes with v1.0.0-rc1: * runtime: Split create and start, #384, #450, #463, #464, #467, #468 * runtime: Remove exec, #388 - * runtime: Enviroment MUST match the configuration, #397 + * runtime: Environment MUST match the configuration, #397 * config: Runtime MUST generate errors for unsupported platforms, #441 * config: Windows mount destinations MUST NOT be nested, #437 @@ -567,7 +567,7 @@ Changes with v1.0.0-rc1: * config: Allow absolute paths for root.path (which previously required relative paths), #394 * config-linux: Add linux.mountLabel, #393 - * config-linux: Add suport for cgroup namespace, #397 + * config-linux: Add support for cgroup namespace, #397 * config-linux: Runtime SHOULD NOT modify ownership of any referenced filesystem (previously the restriction only applied to the root filesystem), #452 @@ -576,7 +576,7 @@ Changes with v1.0.0-rc1: Minor fixes and documentation: * README: Add project.md to the Table of Contents, #376 - * README: Consistenly indent the Table of Contents, #400 + * README: Consistently indent the Table of Contents, #400 * README: Link to LICENSE, #442 * README: Weekly call is OCI-wide, #378 * config: Explicit runtime namespace for hooks, #415 @@ -642,8 +642,7 @@ Changes with v0.5.0: * style: Move one-sentence-per-line rule from the README, #369 * style: Remove dangling parenthesis, #359 * README: Add a link to the IRC logs, #358 - * Fix "manadate", "exmaple", "paramters", and "preferrably" typos, - #353, #354 + * Fix typos, #353, #354 Changes with v0.4.0: Breaking changes: @@ -729,7 +728,7 @@ Changes with v0.2.0: * bundle.md: fix off-by-one error * bundle.md: various updates to latest spec * bundle: Move 'Linux sysctl' header to its own line - * Change commiter to committer + * Fix a typo * Change Device field order in spec_linux.go, 'Path' should be top of the 'Type' field, according to the different of the config-linux.md, 'Path' field is the unique key. * Change layout of mountpoints and mounts * Change the rlimit type to string instead of int @@ -854,7 +853,7 @@ Changes with v0.1.0: * implementations: Link to mrunalp/ocitools * lifecycle: Don't require /run/opencontainer//containers * lifecycle: Mention runtime.json - * lifecycle: no hypens + * lifecycle: no hyphens * MAINTAINERS: add tianon per the charter * MAINTAINERS: correct Vish's github account * Makefile: Add glossary to DOC_FILES diff --git a/config-vm.md b/config-vm.md index 4fd80742d..506f40600 100644 --- a/config-vm.md +++ b/config-vm.md @@ -75,7 +75,7 @@ This image contains the root filesystem that the virtual machine **`kernel`** wi * **`nrMFNs`** (int REQUIRED) Number of pages to be mapped, see [Xen Config][xl-config-format] for the details. * **`irqs`** (array OPTIONAL) Allows VM to access specific physical IRQs, see [Xen Config][xl-config-format] for the details. -This hwConfig object contains the description of the hardware that can be safely passed through to the VM. Where **`deviceTree`** is the path to the device-tree blob, which conains description of the isolated hardware and paravirtualized hardware that should be used by VM. **`dtdevs`**, **`iomems`** and **`irqs`** parameters describing the minimun set of the parameters, needed for VM to access the hardware. +This hwConfig object contains the description of the hardware that can be safely passed through to the VM. Where **`deviceTree`** is the path to the device-tree blob, which contains description of the isolated hardware and paravirtualized hardware that should be used by VM. **`dtdevs`**, **`iomems`** and **`irqs`** parameters describing the minimal set of the parameters, needed for VM to access the hardware. ### Example @@ -111,4 +111,4 @@ This hwConfig object contains the description of the hardware that can be safely [vdi-image-format]: https://forensicswiki.org/wiki/Virtual_Disk_Image_(VDI) [vmdk-image-format]: http://www.vmware.com/app/vmdk/?src=vmdk [vhd-image-format]: https://github.com/libyal/libvhdi/blob/master/documentation/Virtual%20Hard%20Disk%20(VHD)%20image%20format.asciidoc -[xl-config-format]: https://xenbits.xen.org/docs/4.10-testing/man/xl.cfg.5.html \ No newline at end of file +[xl-config-format]: https://xenbits.xen.org/docs/4.10-testing/man/xl.cfg.5.html diff --git a/specs-go/config.go b/specs-go/config.go index f36d2f350..bce831f6f 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -688,7 +688,7 @@ type WindowsHyperV struct { UtilityVMPath string `json:"utilityVMPath,omitempty"` } -// IOMems containes information about iomem addresses that should be passed to the VM. +// IOMems contains information about iomem addresses that should be passed to the VM. type IOMems struct { // Guest Frame Number to map the iomem range. If GFN is not specified, the mapping will be done to the same Frame Number as was provided in FirstMFN. FirstGFN *uint64 `json:"firstGFN,omitempty"` From d7de8c08f3342f6300732ec4b83c69f2814da29d Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sun, 9 Mar 2025 20:44:40 -0700 Subject: [PATCH 2/2] ci: bump golangci-lint to v2.5 Signed-off-by: Kir Kolyshkin --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1274470e5..9a526beb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,10 +33,9 @@ jobs: go get -d ./schema/... - name: run golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v8 with: - version: v1.56.1 - args: --verbose + version: v2.5 - name: run tests run: |