From 0309db5033c72e83bfdb32c1e8157a90f5a4e1f0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 7 Sep 2025 19:46:33 -0700 Subject: [PATCH 1/4] Fix typos in comments --- .github/workflows/check-go-dependencies-task.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index d3f20040..2d20d32b 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -68,7 +68,7 @@ jobs: with: submodules: recursive - # This is required to allow licensee/setup-licensed to install licensed via Ruby gem. + # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. - name: Install Ruby uses: ruby/setup-ruby@v1 with: @@ -135,7 +135,7 @@ jobs: with: submodules: recursive - # This is required to allow licensee/setup-licensed to install licensed via Ruby gem. + # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. - name: Install Ruby uses: ruby/setup-ruby@v1 with: From 599ed9e103cf52925c87b45735b540945c3b1144 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 7 Sep 2025 19:47:08 -0700 Subject: [PATCH 2/4] Adjust wording of step name --- .github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml index fad94411..b46972a9 100644 --- a/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml +++ b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml @@ -81,7 +81,7 @@ jobs: - name: Create all generated documentation content run: task docs:generate - - name: Install Python dependencies + - name: Install Dependencies run: task poetry:install-deps - name: Determine versioning parameters From 423a0790c439a9f50d56ca6d32f201da5f86a654 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 7 Sep 2025 19:48:13 -0700 Subject: [PATCH 3/4] Remove trailing slash from path variable values Paths in some workflows and tasks are configured via variables. Previously, when a value specified a folder path, a trailing slash was added. The intent behind this was to make it slightly more clear that the value was referring to a folder (e.g., `./` vs. `.`). However, this practice can be harmful in the case where the value is used as a base component in a path, as then it is most appropriate to omit the path separator in the concatenation code, which is at all clear (e.g., `FOO_PATH: foo/`, `{{.FOO_PATH}}bar` -> `foo/bar`). And if the separator is used in the concatenation code, it results in a confusing double separator in the resulting path (e.g., `FOO_PATH: foo/`, `{{.FOO_PATH}}/bar` -> `foo//bar`). The benefit of the trailing slash on the variable definition is miniscule at most, since the variable name, documentation, and other context should make it obvious that the value is a folder path. So the harm of this approach outweighs the benefit. For this reason, it is better to omit the trailing slash in the variable definition (e.g., `FOO_PATH: foo`, `{{.FOO_PATH}}/bar` -> `foo/bar`). Even though this approach is not relevant in cases where the path is not used as a base component, it is best to be consistent in this practice. --- .github/workflows/check-go-task.yml | 10 +++++----- .github/workflows/check-license.yml | 2 +- .github/workflows/test-go-task.yml | 2 +- Taskfile.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 2597f167..0a4b97f9 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -62,7 +62,7 @@ jobs: matrix: module: - - path: ./ + - path: . - path: docsgen - path: ruledocsgen @@ -99,7 +99,7 @@ jobs: matrix: module: - - path: ./ + - path: . - path: docsgen - path: ruledocsgen @@ -142,7 +142,7 @@ jobs: matrix: module: - - path: ./ + - path: . - path: docsgen - path: ruledocsgen @@ -185,7 +185,7 @@ jobs: matrix: module: - - path: ./ + - path: . - path: docsgen - path: ruledocsgen @@ -228,7 +228,7 @@ jobs: matrix: module: - - path: ./ + - path: . - path: docsgen - path: ruledocsgen diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index 81960a92..772f9b9e 100644 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -65,7 +65,7 @@ jobs: matrix: check-license: - - path: ./ + - path: . expected-filename: LICENSE.txt # SPDX identifier: https://spdx.org/licenses/ expected-type: GPL-3.0 diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index db8f5a50..9485734d 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -73,7 +73,7 @@ jobs: - windows-latest - macos-latest module: - - path: ./ + - path: . codecov-flags: unit - path: ruledocsgen/ codecov-flags: unit diff --git a/Taskfile.yml b/Taskfile.yml index 62b32b9d..5e48e364 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -9,7 +9,7 @@ vars: PROJECT_NAME: "arduino-lint" DIST_DIR: "dist" # Path of the project's primary Go module: - DEFAULT_GO_MODULE_PATH: ./ + DEFAULT_GO_MODULE_PATH: . DEFAULT_GO_PACKAGES: | $( \ go list \ From 512c586809a96eabb4a3543682f704b4320bae99 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 7 Sep 2025 19:50:43 -0700 Subject: [PATCH 4/4] Use relevant metadata file when determining framework dependency versions These workflows support multiple projects in subfolders of the repository. The version of the frameworks (Go and Node.js) to use is determined from the content of the metadata files. Previously the workflow always used the file located in the root of the repository. The versioning data in that file won't necessarily be correct for the projects in subfolders, so the metadata for the individual project should be used instead. --- .github/workflows/check-go-task.yml | 8 ++++---- .github/workflows/check-npm-task.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 0a4b97f9..9d782964 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -110,7 +110,7 @@ jobs: - name: Install Go uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version-file: ${{ matrix.module.path }}/go.mod - name: Install Task uses: arduino/setup-task@v2 @@ -153,7 +153,7 @@ jobs: - name: Install Go uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version-file: ${{ matrix.module.path }}/go.mod - name: Install Task uses: arduino/setup-task@v2 @@ -196,7 +196,7 @@ jobs: - name: Install Go uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version-file: ${{ matrix.module.path }}/go.mod - name: Install Task uses: arduino/setup-task@v2 @@ -239,7 +239,7 @@ jobs: - name: Install Go uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version-file: ${{ matrix.module.path }}/go.mod - name: Install Task uses: arduino/setup-task@v2 diff --git a/.github/workflows/check-npm-task.yml b/.github/workflows/check-npm-task.yml index 332721dc..2376dcbd 100644 --- a/.github/workflows/check-npm-task.yml +++ b/.github/workflows/check-npm-task.yml @@ -107,7 +107,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v5 with: - node-version-file: package.json + node-version-file: "${{ matrix.project.path }}/package.json" - name: Install Task uses: arduino/setup-task@v2