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
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# http://editorconfig.org/

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.go]
indent_style = tab

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

[webapp/package.json]
indent_size = 2

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

[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server/manifest.go linguist-generated=true
webapp/src/manifest.js linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ on:

jobs:
plugin-ci:
uses: mattermost/actions-workflows/.github/workflows/community-plugin-ci.yml@139a051e8651e6246e3764fe342297b73120e590
uses: mattermost/actions-workflows/.github/workflows/community-plugin-ci.yml@main
secrets: inherit
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
dist
bin/
dist/
webapp/src/manifest.ts
server/manifest.go

# Mac
.DS_Store

# Jetbrains
.idea/

# VS Code
.vscode
78 changes: 42 additions & 36 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
version: "2"

run:
timeout: 5m
modules-download-mode: readonly

linters-settings:
goconst:
min-len: 2
min-occurrences: 2
gofmt:
simplify: true
goimports:
local-prefixes: github.com/mattermost/mattermost-plugin-antivirus
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
misspell:
locale: US

linters:
disable-all: true
default: none
enable:
- bidichk
- bodyclose
- errcheck
- goconst
- gocritic
- gofmt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- makezero
- misspell
- modernize
- nakedret
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unqueryvet
- unused
- whitespace
settings:
govet:
enable-all: true
disable:
- fieldalignment
revive:
rules:
- name: exported
disabled: true
- name: unused-parameter
disabled: true
unqueryvet:
check-sql-builders: true
exclusions:
rules:
- path: server/configuration.go
linters:
- unused
- path: _test\.go
linters:
- bodyclose

issues:
exclude-rules:
- path: server/manifest.go
linters:
- unused
- path: server/configuration.go
linters:
- unused
- path: _test\.go
linters:
- bodyclose
- goconst
- scopelint # https://github.com/kyoh86/scopelint/issues/4
formatters:
enable:
- gofmt
- gofumpt
- goimports
settings:
gofmt:
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any
goimports:
local-prefixes:
- github.com/mattermost/mattermost-plugin-antivirus
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.21.1
20.11
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.

Starter template is on 24.13.1. Should we also jump to a newer version with this repo?

Loading