Skip to content

Commit

Permalink
Chore: Bump versions
Browse files Browse the repository at this point in the history
- Fix lint issues

Signed-off-by: Anoop Gopalakrishnan <[email protected]>
  • Loading branch information
anoop2811 committed Jul 10, 2024
1 parent 5e1b172 commit a8648f5
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/staticcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: '14'
node-version: '16'
cache: 'yarn'
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install Yarn
run: npm install --global yarn
- name: upgrade yarn
run: yarn set version 3.6.0
- run: yarn install
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewAPIServerCommand() *cobra.Command {
Long: `The KubeVela API server validates and configures data for the API objects.
The API Server services REST operations and provides the frontend to the
cluster's shared state through which all other components interact.`,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
if err := s.Validate(); err != nil {
return err
}
Expand All @@ -64,7 +64,7 @@ cluster's shared state through which all other components interact.`,
buildSwaggerCmd := &cobra.Command{
Use: "build-swagger",
Short: "Build swagger documentation of KubeVela apiserver",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
name := "docs/apidoc/latest-swagger.json"
if len(args) > 0 {
name = args[0]
Expand Down
46 changes: 46 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/server/domain/service/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package service
import (
"bytes"
"context"
"crypto/rand"
"errors"
"fmt"
"math/rand"
"sort"
"strings"
"time"
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/domain/service/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (a *authenticationServiceImpl) RefreshToken(_ context.Context, refreshToken

// ParseToken parses and verifies a token
func ParseToken(tokenString string) (*model.CustomClaims, error) {
token, err := jwt.ParseWithClaims(tokenString, &model.CustomClaims{}, func(token *jwt.Token) (interface{}, error) {
token, err := jwt.ParseWithClaims(tokenString, &model.CustomClaims{}, func(token *jwt.Token) (interface{}, error) { //nolint:revive,unused
return []byte(signedKey), nil
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/domain/service/cloudshell.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func (c *cloudShellServiceImpl) newCloudShell(ctx context.Context) (*v1alpha1.Cl

func checkReadOnly(projectName string, permissions []*model.Permission) bool {
ra := &RequestResourceAction{}
ra.SetResourceWithName("project:{projectName}/application:*", func(name string) string {
ra.SetResourceWithName("project:{projectName}/application:*", func(name string) string { //nolint:revive,unused
return projectName
})
ra.SetActions([]string{"deploy"})
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/domain/service/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ func getResourceLogs(ctx context.Context, config *rest.Config, cli client.Client

order := make([]string, 0)
sort.Strings(order)
logMap.Range(func(key, value any) bool {
logMap.Range(func(key, value any) bool { //nolint:revive,unused
order = append(order, key.(string))
return true
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/event/collect/system_info_collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (i *InfoCalculateCronJob) start(cronSpec string) {
_, _ = c.AddFunc(cronSpec, func() {

// ExponentialBackoff retry this job
err := retry.OnError(waitBackOff, func(err error) bool {
err := retry.OnError(waitBackOff, func(err error) bool { //nolint:revive,unused
// always retry
return true
}, func() error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/event/sync/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (a *ApplicationSync) Start(ctx context.Context, errorChan chan error) {
AddFunc: func(obj interface{}) {
addOrUpdateHandler(obj)
},
UpdateFunc: func(oldObj, obj interface{}) {
UpdateFunc: func(oldObj, obj interface{}) { //nolint:revive,unused
addOrUpdateHandler(obj)
},
DeleteFunc: func(obj interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/interfaces/api/cloudshell.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (c *CloudShellView) proxy(req *restful.Request, res *restful.Response) {
proxy.Upgrader = &websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(req *http.Request) bool {
CheckOrigin: func(req *http.Request) bool { //nolint:revive,unused
return true
},
}
Expand Down

0 comments on commit a8648f5

Please sign in to comment.