ci: enhance linting and string manipulations in plugin code

- Update golangci-lint action to v7 and specify version v2.0 in the GitHub testing workflow
- Add `.golangci.yaml` configuration file with various linters and settings
- Refactor string concatenation method for destination file name in `plugin.go`
- Use `strings.ReplaceAll` for replacing spaces in target paths in `plugin.go`
- Change error handling to use `errors.As` for type assertion in `plugin.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2025-04-12 19:41:17 +08:00
parent 7a4b5f1fad
commit e2a386e6ec
3 changed files with 60 additions and 5 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ jobs:
check-latest: true
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: latest
version: v2.0
args: --verbose
- uses: hadolint/hadolint-action@v3.1.0