diff --git a/.github/workflows/build-ui-and-server.yml b/.github/workflows/build-ui-and-server.yml index ee438a0169a..e43dd15f670 100644 --- a/.github/workflows/build-ui-and-server.yml +++ b/.github/workflows/build-ui-and-server.yml @@ -36,7 +36,7 @@ jobs: uses: golangci/golangci-lint-action@v3.2.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: latest + version: v1.47.3 # Optional: working directory, useful for monorepos # working-directory: somedir @@ -337,4 +337,3 @@ jobs: cd docs bundle install bundle exec rake graphql:compile_docs - diff --git a/.github/workflows/mesheryctl-ci.yml b/.github/workflows/mesheryctl-ci.yml index 1150afa4ee5..8d60c85a9b5 100644 --- a/.github/workflows/mesheryctl-ci.yml +++ b/.github/workflows/mesheryctl-ci.yml @@ -32,7 +32,7 @@ jobs: uses: golangci/golangci-lint-action@v3.2.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: latest + version: v1.47.3 # Optional: working directory, useful for monorepos working-directory: mesheryctl @@ -94,7 +94,7 @@ jobs: check-latest: "true" - name: Run script 📜 run: | - cd mesheryctl/doc + cd mesheryctl/doc go run doc.go - name: Commit ✅ uses: stefanzweifel/git-auto-commit-action@v4 @@ -105,4 +105,3 @@ jobs: commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> commit_options: "--signoff" commit_message: "[Docs] Update mesheryctl docs" - diff --git a/.golangci.yml b/.golangci.yml index 812c6ba96c4..4b81a6995b7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -42,7 +42,7 @@ linters-settings: settings: mnd: # don't include the "operation" and "assign" - checks: + checks: - argument - case - condition @@ -150,10 +150,4 @@ run: - internal/renameio - internal/robustio timeout: 5m - -# golangci.com configuration -# https://github.com/golangci/golangci/wiki/Configuration -service: - golangci-lint-version: 1.45.2 # use the fixed version to not introduce new linters unexpectedly - prepare: - - echo "here I can run custom commands, but no preparation needed for this repo" \ No newline at end of file + go: '1.17' diff --git a/helpers/helpers.go b/helpers/helpers.go index 7810ef81de7..82075047b02 100644 --- a/helpers/helpers.go +++ b/helpers/helpers.go @@ -24,6 +24,7 @@ func MergeStringMaps(maps ...map[string]string) map[string]string { } func ResolveFSRef(path string) (string, error) { + // other useless comment return utils.ReadFileSource(fmt.Sprintf("file://%s", path)) } diff --git a/mesheryctl/Makefile b/mesheryctl/Makefile index f2fe7b54ebf..dd0848d7b0b 100644 --- a/mesheryctl/Makefile +++ b/mesheryctl/Makefile @@ -5,7 +5,6 @@ RELEASE_CHANNEL="edge" LDFLAGS="-w -s -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.version=${GIT_VERSION} -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.commitsha=${GIT_COMMITSHA} -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.releasechannel=${RELEASE_CHANNEL}" make: - gofmt -l -s -w . go build -ldflags=${LDFLAGS} -o mesheryctl cmd/mesheryctl/main.go forwin: go build -ldflags=${LDFLAGS} -o mesheryctl.exe cmd/mesheryctl/main.go diff --git a/mesheryctl/pkg/utils/auth.go b/mesheryctl/pkg/utils/auth.go index 41ab83b0a00..2dc37046e29 100644 --- a/mesheryctl/pkg/utils/auth.go +++ b/mesheryctl/pkg/utils/auth.go @@ -29,6 +29,7 @@ type Provider struct { // NewRequest creates *http.Request and handles adding authentication for Meshery itself // Function returns a http response generated by the new request func NewRequest(method string, url string, body io.Reader) (*http.Request, error) { + // useless comment // create new request req, err := http.NewRequest(method, url, body) if err != nil {