Skip to content

Commit

Permalink
Switch to just for building
Browse files Browse the repository at this point in the history
+Add linter config
  • Loading branch information
Andrew-Morozko committed Dec 21, 2023
1 parent 48b1193 commit 1ad825c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 8 deletions.
52 changes: 52 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
run:
skip-dirs:
- tmp
timeout: 5m


linters:
enable-all: true
disable:
# Deprecated
- deadcode
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck
# Annoying
- depguard
- exhaustivestruct
- exhaustruct
- ireturn
- nakedret
- nlreturn
- nonamedreturns
- tagliatelle
- varnamelen
- wsl
# Annoying, but useful. Should be enabled in the future
- cyclop
- funlen
- gochecknoglobals
- godox
- lll

linters-settings:
gomnd:
# Declaring as non-magical
ignored-numbers:
- '2'
godot:
exclude:
- "^\\s*XXX:"
- "^\\s*TODO:"
gci:
sections:
- standard
- default
- prefix(github.com/blackstork-io/fabric)

8 changes: 0 additions & 8 deletions build_and_run.sh

This file was deleted.

19 changes: 19 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default: build build-plugins test-run

build:
go build -o ./bin/ .

build-plugins:
go build -o ./bin/plugins ./cmd/plugins

test-run:
./bin/fabric -path ./templates/ -plugins ./bin/plugins -document "test-document"

clean:
rm -r ./bin/*

lint:
go mod tidy
gofumpt -w .
gci write --skip-generated -s standard -s default -s "prefix(github.com/blackstork-io/fabric)" .
golangci-lint run

0 comments on commit 1ad825c

Please sign in to comment.