Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ trim_trailing_whitespace = true
[*.go]
indent_style = tab

[*.{js,jsx,json,html}]
[*.{js, jsx, ts, tsx, json, html}]
indent_style = space
indent_size = 4

[webapp/package.json]
indent_size = 2

[Makefile,*.mk]
[{Makefile, *.mk}]
indent_style = tab

[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:

permissions:
contents: read
id-token: write

jobs:
plugin-ci:
uses: mattermost/actions-workflows/.github/workflows/plugin-ci.yml@main
secrets: inherit
with:
golang-version: "1.24"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ dist

# VSCode
.vscode

webapp/src/manifest.ts
server/manifest.go
107 changes: 71 additions & 36 deletions .golangci.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Original file line number Diff line number Diff line change
@@ -1,52 +1,87 @@
run:
timeout: 5m
modules-download-mode: readonly

linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/mattermost/mattermost-plugin-demo
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
misspell:
locale: US
revive:
rules:
- name: unused-parameter
disabled: true
version: "2"

linters:
disable-all: true
enable:
- bodyclose
- errcheck
- gocritic
- gofmt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- revive
- staticcheck
- stylecheck
- typecheck
- staticcheck # Now includes gosimple and stylecheck
- unconvert
- unused
- whitespace
- govet # Ensure this is included

settings:
errcheck:
# Add any errcheck settings here
exclude-functions:
- io.Copy(*bytes.Buffer)

gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style

gosec:
# Add gosec settings
excludes:
- G104 # Errors unhandled

staticcheck:
# Configure staticcheck (includes gosimple/stylecheck checks)
checks: ["all"]

revive:
# Add revive rules
rules:
- name: exported
disabled: false

exclusions:
presets:
- comments
- std-error-handling
- common-false-positives

rules:
- path: '_test\.go'
linters:
- errcheck
- gosec

formatters:
enable:
- gofmt
- goimports

settings:
gofmt:
simplify: true

goimports:
local-prefixes:
- github.com/mattermost/mattermost-plugin-demo

output:
formats:
text:
path: stdout
colors: true
print-linter-name: true

run:
timeout: 5m
tests: true

issues:
exclude-rules:
- path: server/configuration.go
linters:
- unused
- path: _test\.go
linters:
- bodyclose
- scopelint # https://github.com/kyoh86/scopelint/issues/4
max-issues-per-linter: 0
max-same-issues: 0
fix: false
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.2
20.11
Loading