diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index af4ad72..b8960e4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -46,7 +46,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version: "1.26" - name: Check Dependencies License run: make dependency-license @@ -60,7 +60,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: "1.26" - name: Check code generation run: make check-codegen @@ -88,13 +88,13 @@ jobs: strategy: matrix: oap: - - b55fa2a5193618cdd7d699ad96fa20ceca9d507e + - 42c613bea94999a6cc8e805ed4c8c7659f3a735c steps: - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: "1.26" - name: Install swctl run: make install DESTDIR=/usr/local/bin @@ -116,7 +116,7 @@ jobs: - name: setup go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: "1.26" - name: run unit tests and report coverage working-directory: ./ diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index dbc761b..3030c85 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -43,7 +43,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: "1.26" - name: Log in to the Container registry uses: docker/login-action@v1.10.0 with: diff --git a/.golangci.yml b/.golangci.yml index 93a77e9..f636f7a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,47 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -linters-settings: - govet: - enable: - - shadow - gocyclo: - min-complexity: 15 - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 2 - misspell: - locale: US - lll: - line-length: 150 - goimports: - local-prefixes: github.com/apache/skywalking-cli - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - ifElseChain - funlen: - lines: 100 - statements: 50 - whitespace: - multi-if: false - multi-func: false - depguard: - rules: - prevent_cli_in_pkg: - files: ["**/pkg/**/*.go"] - deny: - - pkg: "github.com/urfave/cli/v2" - desc: "github.com/urfave/cli/v2 is not allowed in pkg module" +version: "2" linters: + default: none enable: - bodyclose - dogsled @@ -64,21 +27,80 @@ linters: - goconst - gocritic - gocyclo - - gofmt - - goimports - revive - gosec - - gosimple - govet - ineffassign - lll - misspell - nakedret - staticcheck - - stylecheck - - typecheck - unconvert - unparam - unused - whitespace - depguard + settings: + govet: + enable: + - shadow + gocyclo: + min-complexity: 15 + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 2 + misspell: + locale: US + lll: + line-length: 150 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + disabled-checks: + - ifElseChain + funlen: + lines: 100 + statements: 50 + whitespace: + multi-if: false + multi-func: false + depguard: + rules: + prevent_cli_in_pkg: + files: ["**/pkg/**/*.go"] + deny: + - pkg: "github.com/urfave/cli/v2" + desc: "github.com/urfave/cli/v2 is not allowed in pkg module" + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: [revive] + text: "exported: exported .* should have comment" + - linters: [gosec] + text: "G104" + - linters: [errcheck] + text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked" + paths: + - third_party$ + - builtin$ + - examples$ + +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - github.com/apache/skywalking-cli diff --git a/Dockerfile b/Dockerfile index 2bd2213..e4c833e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.24 AS builder +FROM golang:1.26 AS builder ARG VERSION diff --git a/Makefile b/Makefile index 09d9725..d321b1a 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ deps: @$(GO_GET) -v -t ./... $(GO_LINT): - @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.0 + @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 $(LICENSE_EYE): @$(LICENSE_EYE) --version > /dev/null 2>&1 || go install github.com/apache/skywalking-eyes/cmd/license-eye@d38fe05 diff --git a/go.mod b/go.mod index 4230fda..b45a2f0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/apache/skywalking-cli -go 1.24.2 +go 1.26 require ( github.com/apache/skywalking-swck/operator v0.0.0-20250424112814-f5c5243fcfb2 diff --git a/test/cases/basic/expected/layer-list.yml b/test/cases/basic/expected/layer-list.yml index a099277..360f638 100644 --- a/test/cases/basic/expected/layer-list.yml +++ b/test/cases/basic/expected/layer-list.yml @@ -21,6 +21,8 @@ - FAAS - MESH_CP - AWS_GATEWAY +- GENAI +- BANYANDB - NGINX - SO11Y_JAVA_AGENT - ACTIVEMQ @@ -39,7 +41,9 @@ - CACHE - OS_WINDOWS - SO11Y_GO_AGENT +- ENVOY_AI_GATEWAY - MESH_DP +- VIRTUAL_GENAI - SO11Y_OAP - DATABASE - OS_LINUX