snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
This commit is contained in:
281
server/.golangci.yml
Normal file
281
server/.golangci.yml
Normal file
@@ -0,0 +1,281 @@
|
||||
version: "2"
|
||||
linters:
|
||||
default: all
|
||||
disable:
|
||||
- bodyclose
|
||||
- canonicalheader
|
||||
- containedctx # storing context.Context in a struct is an established pattern here
|
||||
- contextcheck
|
||||
- cyclop
|
||||
- depguard
|
||||
- dogsled # test helpers return many values; blank-heavy destructuring is idiomatic
|
||||
- dupl
|
||||
- dupword
|
||||
- embeddedstructfieldcheck
|
||||
- err113
|
||||
- errchkjson
|
||||
- errname
|
||||
- errorlint
|
||||
- exhaustive
|
||||
- exhaustruct
|
||||
- forbidigo
|
||||
- forcetypeassert
|
||||
- funcorder
|
||||
- funlen
|
||||
- gocheckcompilerdirectives # //go:fix is a valid directive in Go 1.24+; linter doesn't know it yet
|
||||
- gochecknoglobals
|
||||
- gochecknoinits
|
||||
- gocognit
|
||||
- goconst
|
||||
- gocritic
|
||||
- gocyclo
|
||||
- godoclint
|
||||
- godot
|
||||
- godox
|
||||
- gomoddirectives # replace directives in go.mod are intentional forks
|
||||
- gomodguard # deprecated since v2.12.0; replaced by gomodguard_v2 (enabled via default: all)
|
||||
- goprintffuncname # Ephemeral → Ephemeralf rename is a plugin API breaking change; deferred
|
||||
- gosec
|
||||
- gosmopolitan
|
||||
- iface # identical job interfaces are intentional — type-safe scheduling without coupling
|
||||
- inamedparam
|
||||
- interfacebloat
|
||||
- iotamixing # const blocks intentionally mix iota with explicit values (ABI stability, ASCII)
|
||||
- ireturn
|
||||
- lll
|
||||
- maintidx
|
||||
- mnd
|
||||
- musttag
|
||||
- nakedret
|
||||
- nestif
|
||||
- nilerr # intentionally dropping errors is common here (graceful degradation, security non-disclosure, fallbacks)
|
||||
- nilnil
|
||||
- nlreturn
|
||||
- noctx
|
||||
- noinlineerr
|
||||
- nolintlint
|
||||
- nonamedreturns
|
||||
- paralleltest
|
||||
- perfsprint
|
||||
- prealloc
|
||||
- predeclared # variable named 'copy' is intentional; already suppressed for revive
|
||||
- promlinter # metric renames are a breaking change; deferred
|
||||
- protogetter
|
||||
- recvcheck
|
||||
- sqlclosecheck # wrapper functions return *sqlx.Rows to callers who close them; not a real leak
|
||||
- tagalign
|
||||
- tagliatelle
|
||||
- testableexamples
|
||||
- testifylint
|
||||
- testpackage
|
||||
- thelper
|
||||
- tparallel
|
||||
- unparam
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
- varnamelen
|
||||
- wastedassign
|
||||
- wrapcheck
|
||||
- wsl
|
||||
- wsl_v5
|
||||
settings:
|
||||
govet:
|
||||
disable:
|
||||
- fieldalignment
|
||||
enable-all: true
|
||||
unqueryvet:
|
||||
check-sql-builders: true
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- std-error-handling
|
||||
rules:
|
||||
- linters:
|
||||
- unused
|
||||
text: SetupEnterprise
|
||||
- linters:
|
||||
- revive
|
||||
text: var-naming|error-naming|exported|increment-decrement|error-strings|if-return|unused-parameter|blank-imports|empty-block
|
||||
- linters:
|
||||
- revive
|
||||
path: enterprise
|
||||
text: var-naming|error-naming|exported|increment-decrement|error-strings|if-return|unused-parameter|blank-imports|empty-block
|
||||
- linters:
|
||||
- misspell
|
||||
path: platform/shared/markdown/html_entities.go
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: SA1019
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: ST1023
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: ST1012
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: ST1005
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1011
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1001
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1003
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1012
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QT1019
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1008
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1004
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: ST1019
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1006
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1002
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1007
|
||||
- linters:
|
||||
- errcheck
|
||||
path: "\
|
||||
channels/store/localcachelayer/autotranslation_layer.go|\
|
||||
channels/store/localcachelayer/channel_layer.go|\
|
||||
channels/store/localcachelayer/channel_layer_test.go|\
|
||||
channels/store/localcachelayer/emoji_layer.go|\
|
||||
channels/store/localcachelayer/emoji_layer_test.go|\
|
||||
channels/store/localcachelayer/file_info_layer.go|\
|
||||
channels/store/localcachelayer/file_info_layer_test.go|\
|
||||
channels/store/localcachelayer/post_layer.go|\
|
||||
channels/store/localcachelayer/post_layer_test.go|\
|
||||
channels/store/localcachelayer/reaction_layer.go|\
|
||||
channels/store/localcachelayer/reaction_layer_test.go|\
|
||||
channels/store/localcachelayer/role_layer.go|\
|
||||
channels/store/localcachelayer/role_layer_test.go|\
|
||||
channels/store/localcachelayer/scheme_layer.go|\
|
||||
channels/store/localcachelayer/scheme_layer_test.go|\
|
||||
channels/store/localcachelayer/team_layer.go|\
|
||||
channels/store/localcachelayer/terms_of_service_layer.go|\
|
||||
channels/store/localcachelayer/terms_of_service_layer_test.go|\
|
||||
channels/store/localcachelayer/user_layer.go|\
|
||||
channels/store/localcachelayer/webhook_layer.go|\
|
||||
channels/store/localcachelayer/webhook_layer_test.go|\
|
||||
channels/store/retrylayer/retrylayer_test.go|\
|
||||
channels/store/searchtest/channel_layer.go|\
|
||||
channels/store/searchtest/cjk_plugins.go|\
|
||||
channels/store/searchtest/file_info_layer.go|\
|
||||
channels/store/searchtest/helper.go|\
|
||||
channels/store/searchtest/post_layer.go|\
|
||||
channels/store/searchtest/user_layer.go|\
|
||||
channels/store/sqlstore/command_store.go|\
|
||||
channels/store/sqlstore/integrity_test.go|\
|
||||
channels/store/sqlstore/session_store.go|\
|
||||
channels/store/sqlstore/store.go|\
|
||||
channels/store/storetest/channel_bookmark.go|\
|
||||
channels/store/storetest/channel_store.go|\
|
||||
channels/store/storetest/channel_store_categories.go|\
|
||||
channels/store/storetest/file_info_store.go|\
|
||||
channels/store/storetest/group_store.go|\
|
||||
channels/store/storetest/job_store.go|\
|
||||
channels/store/storetest/post_persistent_notification_store.go|\
|
||||
channels/store/storetest/post_store.go|\
|
||||
channels/store/storetest/product_notices_store.go|\
|
||||
channels/store/storetest/role_store.go|\
|
||||
channels/store/storetest/scheme_store.go|\
|
||||
channels/store/storetest/shared_channel_store.go|\
|
||||
channels/store/storetest/team_store.go|\
|
||||
channels/store/storetest/thread_store.go|\
|
||||
channels/store/storetest/user_store.go|\
|
||||
cmd/mattermost/commands/cmdtestlib.go|\
|
||||
cmd/mattermost/commands/db.go|\
|
||||
cmd/mattermost/commands/export.go|\
|
||||
cmd/mattermost/commands/import.go|\
|
||||
cmd/mattermost/commands/jobserver.go|\
|
||||
cmd/mattermost/commands/server.go|\
|
||||
cmd/mattermost/commands/server_test.go|\
|
||||
cmd/mattermost/commands/test.go|\
|
||||
cmd/mattermost/commands/version.go|\
|
||||
platform/services/cache/lru_striped.go|\
|
||||
platform/services/cache/lru_striped_bench_test.go|\
|
||||
platform/services/cache/lru_striped_test.go|\
|
||||
platform/services/cache/lru_test.go|\
|
||||
platform/services/docextractor/combine.go|\
|
||||
platform/services/docextractor/pdf.go|\
|
||||
platform/services/imageproxy/local.go|\
|
||||
platform/services/imageproxy/local_test.go|\
|
||||
platform/services/remotecluster/invitation.go|\
|
||||
platform/services/remotecluster/ping_test.go|\
|
||||
platform/services/remotecluster/send_test.go|\
|
||||
platform/services/remotecluster/sendfile.go|\
|
||||
platform/services/remotecluster/sendprofileImage_test.go|\
|
||||
platform/services/sharedchannel/attachment.go|\
|
||||
platform/services/sharedchannel/channelinvite.go|\
|
||||
platform/services/sharedchannel/permalink_test.go|\
|
||||
platform/services/sharedchannel/sync_recv.go|\
|
||||
platform/services/sharedchannel/sync_send.go|\
|
||||
platform/services/telemetry/telemetry.go|\
|
||||
platform/services/telemetry/telemetry_test.go|\
|
||||
platform/services/upgrader/upgrader_linux.go|\
|
||||
platform/services/upgrader/upgrader_linux_test.go|\
|
||||
platform/shared/filestore/filesstore_test.go|\
|
||||
platform/shared/filestore/s3store.go|\
|
||||
platform/shared/filestore/s3store_test.go|\
|
||||
platform/shared/mail/inbucket.go|\
|
||||
platform/shared/mail/mail.go|\
|
||||
platform/shared/mail/mail_test.go|\
|
||||
platform/shared/mfa/mfa.go|\
|
||||
platform/shared/templates/templates_test.go|\
|
||||
public/model/channel.go|\
|
||||
public/model/client4.go|\
|
||||
public/model/config.go|\
|
||||
public/model/incoming_webhook.go|\
|
||||
public/model/license.go|\
|
||||
public/model/link_metadata.go|\
|
||||
public/model/post.go|\
|
||||
public/model/preference.go|\
|
||||
public/model/user.go|\
|
||||
public/model/utils.go|\
|
||||
public/model/websocket_client.go|\
|
||||
public/model/websocket_message_test.go|\
|
||||
public/plugin/http.go|\
|
||||
public/plugin/supervisor_test.go|\
|
||||
public/shared/mlog/default.go|\
|
||||
public/shared/mlog/global_test.go|\
|
||||
public/shared/mlog/mlog.go"
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
settings:
|
||||
gofmt:
|
||||
simplify: true
|
||||
rewrite-rules:
|
||||
- pattern: interface{}
|
||||
replacement: any
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
- mock.*
|
||||
issues:
|
||||
max-issues-per-linter: 0 # no maximum
|
||||
max-same-issues: 0 # no maximum
|
||||
Reference in New Issue
Block a user