add checks

Amolith created

Change summary

.golangci.toml | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
justfile       |  27 ++++++++++++
2 files changed, 141 insertions(+)

Detailed changes

.golangci.toml 🔗

@@ -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"
+]

justfile 🔗

@@ -0,0 +1,27 @@
+# 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 p2c
+