add justfile and ci-lint config

This commit is contained in:
Amolith 2023-09-24 17:07:42 -04:00
parent 33c8319f38
commit 9c3a304af8
Signed by: Amolith
GPG Key ID: 8AE30347CE28D101
2 changed files with 140 additions and 0 deletions

114
.golangci.toml Normal file
View File

@ -0,0 +1,114 @@
# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
#
# SPDX-License-Identifier: CC0-1.0
[run]
concurrency = 8
timeout = "30m"
issues-exit-code = 1
tests = true
skip-dirs = ["frontend"]
modules-download-mode = "readonly"
go = ""
[output]
print-issued-lines = false
print-linter-name = true
uniq-by-line = false
path-prefix = ""
sort-results = true
[issues]
max-issues-per-linter = 0
max-same-issues = 0
new = false
fix = false
[linters]
fast = false
eeable = [
"asasalint",
"asciicheck",
"bidichk",
"bodyclose",
"contextcheck",
"durationcheck",
"errcheck",
"errname",
"errorlint",
"exportloopref",
"gocritic",
"godot",
"gofumpt",
"goimports",
"gomoddirectives",
"gosec",
"gosimple",
"govet",
"ineffassign",
"misspell",
"nakedret",
"nilerr",
"nilnil",
"noctx",
"nolintlint",
"prealloc",
"predeclared",
"promlinter",
"reassign",
"revive",
"rowserrcheck",
"sqlclosecheck",
"stylecheck",
"tagliatelle",
"tenv",
"testableexamples",
"thelper",
"tparallel",
"unconvert",
"unparam",
"unused",
"usestdlibvars",
"wastedassign",
"containedctx",
"cyclop",
"decorder",
"depguard",
"dogsled",
"dupl",
"dupword",
"errchkjson",
"execinquery",
"exhaustive",
"exhaustruct",
"forcetypeassert",
"funlen",
"gci",
"gocheckcompilerdirectives",
"gocognit",
"gocyclo",
"godox",
"goerr113",
"gomnd",
"gomodguard",
"goprintffuncname",
"grouper",
"importas",
"interfacebloat",
"ireturn",
"lll",
"loggercheck",
"maintidx",
"makezero",
"musttag",
"nestif",
"nonamedreturns",
"nosprintfhostport",
"paralleltest",
"testpackage",
"typecheck",
"varnamelen",
"whitespace",
"wrapcheck",
"wsl"
]

26
justfile Normal file
View File

@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
#
# SPDX-License-Identifier: CC0-1.0
default: reuse lint test staticcheck
reuse:
reuse lint
lint:
# Linting Go code
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
test:
# Running tests
go test -v ./...
staticcheck:
# Performing static analysis
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
clean:
# Cleaning up
rm -rf willow