Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
newm4n authored Aug 16, 2023
2 parents 9b8e7c7 + 332a254 commit 4abad35
Show file tree
Hide file tree
Showing 63 changed files with 3,114 additions and 1,389 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/build-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v2
go-version: '1.20'
- uses: actions/checkout@v3
- name: Fetching dependencies
run : go get -v -t -d ./...
- name: Install GoLint
run : |
go get -d golang.org/x/lint/golint
go install golang.org/x/lint/golint
echo $GOBIN
- name: Execute test
run : make test-short
256 changes: 256 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
run:
skip-dirs:
- src/external_libs
- autogenerated_by_my_lib
skip-files:
- "[\\s\\S]+_test.go$"
# - ".*\\.my\\.go$"
# - lib/bad.go
go: '1.20'
linters:
# Disable all linters.
# Default: false
disable-all: false
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
# - contextcheck
# - cyclop
- deadcode
- decorder
# - depguard
- dogsled
# - dupl
# - dupword
- durationcheck
# - errcheck
# - errchkjson
# - errname
# - errorlint
# - execinquery
# - exhaustive
# - exhaustivestruct
# - exhaustruct
# - exportloopref
# - forbidigo
# - forcetypeassert
# - funlen
# - gci
# - ginkgolinter
# - gocheckcompilerdirectives
# - gochecknoglobals
# - gochecknoinits
# - gocognit
# - goconst
# - gocritic
# - gocyclo
# - godot
# - godox
# - goerr113
- gofmt
# - gofumpt
# - goheader
# - goimports
- golint
# - gomnd
# - gomoddirectives
# - gomodguard
# - goprintffuncname
# - gosec
# - gosimple
# - gosmopolitan
# - govet
# - grouper
# - ifshort
# - importas
# - ineffassign
# - interfacebloat
# - interfacer
# - ireturn
# - lll
# - loggercheck
# - maintidx
# - makezero
# - maligned
# - mirror
# - misspell
# - musttag
# - nakedret
# - nestif
# - nilerr
# - nilnil
- nlreturn
- noctx
# - nolintlint
# - nonamedreturns
# - nosnakecase
# - nosprintfhostport
# - paralleltest
# - prealloc
# - predeclared
# - promlinter
# - reassign
# - revive
# - rowserrcheck
# - scopelint
# - sqlclosecheck
# - staticcheck
# - structcheck
# - stylecheck
# - tagalign
# - tagliatelle
# - tenv
# - testableexamples
# - testpackage
# - thelper
# - tparallel
# - typecheck
# - unconvert
# - unparam
- unused
# - usestdlibvars
- varcheck
- varnamelen
# - wastedassign
# - whitespace
# - wrapcheck
# - wsl
# - zerologlint
# Enable all available linters.
# Default: false
enable-all: false
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
# - asasalint
# - asciicheck
# - bidichk
# - bodyclose
# - containedctx
# - contextcheck
- cyclop
# - deadcode
# - decorder
- depguard
# - dogsled
- dupl
- dupword
# - durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exhaustivestruct
- exhaustruct
- exportloopref
- forbidigo
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
# - gofmt
- gofumpt
- goheader
- goimports
# - golint
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- grouper
- ifshort
- importas
- ineffassign
- interfacebloat
- interfacer
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- maligned
- mirror
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
# - nlreturn
# - noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
# - unused
- usestdlibvars
# - varcheck
# - varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl
- zerologlint
# Enable presets.
# https://golangci-lint.run/usage/linters
presets:
# - bugs
# - comment
# - complexity
# - error
# - format
# - import
# - metalinter
# - module
# - performance
# - sql
# - style
# - test
- unused
# Run only fast linters from enabled linters set (first run won't be fast)
# Default: false
fast: false
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ build: fix-antlr4-bug
export GO111MODULE on; \
go build ./...

lint: build
ifndef GOBIN
"${GOPATH}/bin/golint" -set_exit_status builder/... engine/... examples/... ast/... pkg/... antlr/. model/...
else
"${GOBIN}/golint" -set_exit_status builder/... engine/... examples/... ast/... pkg/... antlr/. model/...
endif

test-short: build
go test ./... -v -covermode=count -coverprofile=coverage.out -short

Expand Down
Loading

0 comments on commit 4abad35

Please sign in to comment.