generated from ISUCT/Algorithm_2023
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
933 additions
and
633 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,111 @@ | ||
run: | ||
tests: false | ||
skip-files: | ||
- \.pb\.go$ | ||
- \.pb\.validate\.go$ | ||
- \.pb\.gw\.go$ | ||
|
||
linters-settings: | ||
dupl: | ||
threshold: 500 | ||
# commented linter rules should be uncommented when corresponding linter will be enabled | ||
# funlen: | ||
# lines: 160 | ||
# statements: 60 | ||
gci: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
# revive: | ||
# min-confidence: 0 | ||
# gomnd: | ||
# checks: | ||
# - argument | ||
# - case | ||
# - condition | ||
# - return | ||
lll: | ||
line-length: 160 | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
# Disabled linters should be enabled later | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
# - deadcode | ||
- decorder | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- durationcheck | ||
# - errcheck | ||
- errchkjson | ||
# - errname | ||
- errorlint | ||
- execinquery | ||
- exportloopref | ||
# - forbidigo | ||
- forcetypeassert | ||
# - funlen | ||
- gocognit | ||
- goconst | ||
# - gocritic | ||
- gocyclo | ||
# - gofmt | ||
# - gofumpt | ||
- goheader | ||
# - goimports | ||
# - gomnd | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- grouper | ||
# - ifshort | ||
- importas | ||
- ineffassign | ||
- lll | ||
# - maintidx | ||
- makezero | ||
# - misspell | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- noctx | ||
# - nolintlint | ||
- nosprintfhostport | ||
- paralleltest | ||
# - prealloc | ||
# - predeclared | ||
- promlinter | ||
# - revive | ||
- rowserrcheck | ||
- sqlclosecheck | ||
# - structcheck | ||
# - stylecheck | ||
# - tagliatelle | ||
- tenv | ||
- testpackage | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
# - varcheck | ||
- wastedassign | ||
- whitespace | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gomnd | ||
- text: "File is not `goimports`-ed with -local github.com/golangci/golangci-lint" | ||
linters: | ||
- goimports | ||
run: | ||
tests: false | ||
skip-files: | ||
- \.pb\.go$ | ||
- \.pb\.validate\.go$ | ||
- \.pb\.gw\.go$ | ||
|
||
linters-settings: | ||
dupl: | ||
threshold: 500 | ||
# commented linter rules should be uncommented when corresponding linter will be enabled | ||
# funlen: | ||
# lines: 160 | ||
# statements: 60 | ||
gci: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
# revive: | ||
# min-confidence: 0 | ||
# gomnd: | ||
# checks: | ||
# - argument | ||
# - case | ||
# - condition | ||
# - return | ||
lll: | ||
line-length: 160 | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
# Disabled linters should be enabled later | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
# - deadcode | ||
- decorder | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- durationcheck | ||
# - errcheck | ||
- errchkjson | ||
# - errname | ||
- errorlint | ||
- execinquery | ||
- exportloopref | ||
# - forbidigo | ||
- forcetypeassert | ||
# - funlen | ||
- gocognit | ||
- goconst | ||
# - gocritic | ||
- gocyclo | ||
# - gofmt | ||
# - gofumpt | ||
- goheader | ||
# - goimports | ||
# - gomnd | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- grouper | ||
# - ifshort | ||
- importas | ||
- ineffassign | ||
- lll | ||
# - maintidx | ||
- makezero | ||
# - misspell | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- noctx | ||
# - nolintlint | ||
- nosprintfhostport | ||
- paralleltest | ||
# - prealloc | ||
# - predeclared | ||
- promlinter | ||
# - revive | ||
- rowserrcheck | ||
- sqlclosecheck | ||
# - structcheck | ||
# - stylecheck | ||
# - tagliatelle | ||
- tenv | ||
- testpackage | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
# - varcheck | ||
- wastedassign | ||
- whitespace | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gomnd | ||
- text: "File is not `goimports`-ed with -local github.com/golangci/golangci-lint" | ||
linters: | ||
- goimports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch test function", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "test", | ||
"program": "${file}", | ||
}, | ||
{ | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${fileDirname}", | ||
"console": "integratedTerminal", | ||
"args": ["sample"], | ||
"showLog": true | ||
} | ||
] | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${fileDirname}", | ||
"console": "integratedTerminal", | ||
"args": ["sample"], | ||
"showLog": true | ||
} | ||
{ | ||
"name": "Launch test function", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "test", | ||
"program": "${file}", | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"go.lintTool": "golangci-lint", | ||
"go.lintFlags": ["--fast"] | ||
} | ||
{ | ||
"go.lintTool": "golangci-lint", | ||
"go.lintFlags": ["--fast"], | ||
"go.delveConfig": { | ||
"debugAdapter": "legacy" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
# Работа с проектом | ||
|
||
`vscode` при старте предложит установить рекомендованныек расширения - с ним лучше согласиться. | ||
|
||
|
||
## Настройка окружения | ||
|
||
### Golang | ||
|
||
Установите `golang` для соответствующей операционной системы. | ||
|
||
Запустите выкачивание зависимостей | ||
|
||
```shell | ||
go mod tidy | ||
``` | ||
|
||
Для локальной проверки линтером следует установить линтер. Устанавливать следует из git bash терминала в случае `windows` | ||
|
||
```shell | ||
# binary will be $(go env GOPATH)/bin/golangci-lint | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 | ||
``` | ||
|
||
Для запуска линтера следует выполнить следующую команду | ||
```shell | ||
$(go env GOPATH)/bin/golangci-lint run -vvv --out-format tab --print-resources-usage --timeout=180s --config=.golangci.yml | ||
``` | ||
|
||
### Запуск тестов | ||
|
||
```shell | ||
go test -count=1 -p 1 -v ./... | ||
# Работа с проектом | ||
|
||
`vscode` при старте предложит установить рекомендованныек расширения - с ним лучше согласиться. | ||
|
||
|
||
## Настройка окружения | ||
|
||
### Golang | ||
|
||
Установите `golang` для соответствующей операционной системы. | ||
|
||
Запустите выкачивание зависимостей | ||
|
||
```shell | ||
go mod tidy | ||
``` | ||
|
||
Для локальной проверки линтером следует установить линтер. Устанавливать следует из git bash терминала в случае `windows` | ||
|
||
```shell | ||
# binary will be $(go env GOPATH)/bin/golangci-lint | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 | ||
``` | ||
|
||
Для запуска линтера следует выполнить следующую команду | ||
```shell | ||
$(go env GOPATH)/bin/golangci-lint run -vvv --out-format tab --print-resources-usage --timeout=180s --config=.golangci.yml | ||
``` | ||
|
||
### Запуск тестов | ||
|
||
```shell | ||
go test -count=1 -p 1 -v ./... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
}, | ||
], | ||
"settings": { | ||
"files.exclude": { | ||
"**/.git": true, | ||
}, | ||
}, | ||
"extensions": { | ||
"recommendations": [ | ||
"golang.go", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
} | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
}, | ||
], | ||
"settings": { | ||
"files.exclude": { | ||
"**/.git": true, | ||
}, | ||
}, | ||
"extensions": { | ||
"recommendations": [ | ||
"golang.go", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
} |
Oops, something went wrong.