diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fbce50d662c6c7cf029ae05fa9ea22fbd47a994a --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,21 @@ +issues: + exclude-use-default: true + exclude-dirs-use-default: true + exclude-files: + - ".*\\.cpp$" + - ".*\\.h$" + - ".*\\.sh$" + - ".*\\.py$" + - ".*\\.qml$" + exclude-dirs: + - "gui" +linters: + disable-all: true + enable: + - errcheck + - gosimple + - ineffassign + - govet + - unused + - gofmt + diff --git a/Makefile b/Makefile index e57920371bcd1d4533e8b62252cfaabe250bb717..107b418dad3eba41a71645fbfe8c0997ee99965d 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ OSXMORDORUID ?= uid GOPATH = $(shell go env GOPATH) TARGET_GOLIB=lib/libgoshim.a SOURCE_GOLIB=gui/backend.go -SOURCE_DIRS_GO = pkg cmd tests gui +SOURCE_DIRS_GO = pkg cmd gui # detect OS UNAME = $(shell uname -s) @@ -312,6 +312,10 @@ test: fmt: @gofmt -s -w $(SOURCE_DIRS_GO) +.PHONY: lint +lint: + golangci-lint run --timeout=5m + test_ui: build_golib @${QMAKE} -o tests/Makefile test.pro @${MAKE} -C tests clean