mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Enable golangci-lint (attempt 2) (#23517)
This time we are just using the Makefile command to see if that makes a difference ```release-note NONE ```
This commit is contained in:
parent
20ec920b71
commit
c7295b01e5
21
.github/workflows/server-ci-template.yml
vendored
21
.github/workflows/server-ci-template.yml
vendored
@ -51,6 +51,27 @@ jobs:
|
||||
run: make modules-tidy
|
||||
- name: Check modules
|
||||
run: if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; git diff; exit 1; fi
|
||||
golangci:
|
||||
name: golangci-lint
|
||||
runs-on: ubuntu-22.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: server
|
||||
steps:
|
||||
- name: Checkout mattermost-server
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
||||
with:
|
||||
go-version: ${{ env.go-version }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
- name: Setup go.work
|
||||
run: make setup-go-work
|
||||
- name: Run golangci
|
||||
run: make golangci-lint
|
||||
|
||||
check-gen-serialized:
|
||||
name: Check serialization methods for hot structs
|
||||
runs-on: ubuntu-22.04
|
||||
|
@ -1,5 +1,5 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
timeout: 10m
|
||||
skip-dirs:
|
||||
- channels/store/storetest/mocks
|
||||
|
||||
|
@ -294,11 +294,11 @@ else
|
||||
endif
|
||||
|
||||
golangci-lint: ## Run golangci-lint on codebase
|
||||
@# Keep the version in sync with the command in .circleci/config.yml
|
||||
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
|
||||
|
||||
@echo Running golangci-lint
|
||||
$(GOBIN)/golangci-lint run ./...
|
||||
$(GOBIN)/golangci-lint run ./public/...
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
ifneq ($(MM_NO_ENTERPRISE_LINT),true)
|
||||
$(GOBIN)/golangci-lint run $(BUILD_ENTERPRISE_DIR)/...
|
||||
@ -415,7 +415,7 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
endif
|
||||
endif
|
||||
|
||||
check-style: golangci-lint plugin-checker vet ## Runs style/lint checks
|
||||
check-style: plugin-checker vet golangci-lint ## Runs style/lint checks
|
||||
|
||||
|
||||
do-cover-file: ## Creates the test coverage report file.
|
||||
|
Loading…
Reference in New Issue
Block a user