forked from TrueCloudLab/zapjournald
[#10] Add basic templates for repository
Signed-off-by: Aleksey Savaitan <a.savaitan@yadro.com>
This commit is contained in:
parent
9432aa2d73
commit
a6eb2f6261
4 changed files with 127 additions and 11 deletions
50
.gitignore
vendored
Normal file
50
.gitignore
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# IDE
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# Vendoring
|
||||||
|
vendor
|
||||||
|
|
||||||
|
# tempfiles
|
||||||
|
.DS_Store
|
||||||
|
*~
|
||||||
|
.cache
|
||||||
|
|
||||||
|
temp
|
||||||
|
tmp
|
||||||
|
|
||||||
|
# binary
|
||||||
|
bin/
|
||||||
|
release/
|
||||||
|
|
||||||
|
# coverage
|
||||||
|
coverage.txt
|
||||||
|
coverage.html
|
||||||
|
|
||||||
|
# testing
|
||||||
|
cmd/test
|
||||||
|
/plugins/
|
||||||
|
testfile
|
||||||
|
|
||||||
|
# misc
|
||||||
|
|
||||||
|
# debhelpers
|
||||||
|
debian/*debhelper*
|
||||||
|
|
||||||
|
# logfiles
|
||||||
|
debian/*.log
|
||||||
|
|
||||||
|
# .substvars
|
||||||
|
debian/*.substvars
|
||||||
|
|
||||||
|
# .bash-completion
|
||||||
|
debian/*.bash-completion
|
||||||
|
|
||||||
|
# Install folders and files
|
||||||
|
debian/frostfs-cli/
|
||||||
|
debian/frostfs-ir/
|
||||||
|
debian/files
|
||||||
|
debian/frostfs-storage/
|
||||||
|
debian/changelog
|
||||||
|
man/
|
||||||
|
debs/
|
11
.gitlint
Normal file
11
.gitlint
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[general]
|
||||||
|
fail-without-commits=True
|
||||||
|
regex-style-search=True
|
||||||
|
contrib=CC1
|
||||||
|
|
||||||
|
[title-match-regex]
|
||||||
|
regex=^\[\#[0-9Xx]+\]\s
|
||||||
|
|
||||||
|
[ignore-by-title]
|
||||||
|
regex=^Release(.*)
|
||||||
|
ignore=title-match-regex
|
|
@ -4,10 +4,10 @@
|
||||||
# options for analysis running
|
# options for analysis running
|
||||||
run:
|
run:
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
||||||
timeout: 5m
|
timeout: 10m
|
||||||
|
|
||||||
# include test files or not, default is true
|
# include test files or not, default is true
|
||||||
tests: true
|
tests: false
|
||||||
|
|
||||||
# output configuration options
|
# output configuration options
|
||||||
output:
|
output:
|
||||||
|
@ -24,6 +24,13 @@ linters-settings:
|
||||||
govet:
|
govet:
|
||||||
# report about shadowed variables
|
# report about shadowed variables
|
||||||
check-shadowing: false
|
check-shadowing: false
|
||||||
|
staticcheck:
|
||||||
|
checks: ["all", "-SA1019"] # TODO Enable SA1019 after deprecated warning are fixed.
|
||||||
|
funlen:
|
||||||
|
lines: 80 # default 60
|
||||||
|
statements: 60 # default 40
|
||||||
|
gocognit:
|
||||||
|
min-complexity: 40 # default 30
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
|
@ -34,23 +41,26 @@ linters:
|
||||||
# some default golangci-lint linters
|
# some default golangci-lint linters
|
||||||
- errcheck
|
- errcheck
|
||||||
- gosimple
|
- gosimple
|
||||||
|
- godot
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- typecheck
|
- typecheck
|
||||||
- unused
|
- unused
|
||||||
|
|
||||||
# extra linters
|
# extra linters
|
||||||
|
- bidichk
|
||||||
|
- durationcheck
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- godot
|
- exportloopref
|
||||||
- gofmt
|
- gofmt
|
||||||
- whitespace
|
|
||||||
- goimports
|
- goimports
|
||||||
|
- misspell
|
||||||
|
- predeclared
|
||||||
|
- reassign
|
||||||
|
- whitespace
|
||||||
|
- containedctx
|
||||||
|
- funlen
|
||||||
|
- gocognit
|
||||||
|
- contextcheck
|
||||||
disable-all: true
|
disable-all: true
|
||||||
fast: false
|
fast: false
|
||||||
|
|
||||||
issues:
|
|
||||||
include:
|
|
||||||
- EXC0002 # should have a comment
|
|
||||||
- EXC0003 # test/Test ... consider calling this
|
|
||||||
- EXC0004 # govet
|
|
||||||
- EXC0005 # C-style breaks
|
|
45
.pre-commit-config.yaml
Normal file
45
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
ci:
|
||||||
|
autofix_prs: false
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/jorisroovers/gitlint
|
||||||
|
rev: v0.19.1
|
||||||
|
hooks:
|
||||||
|
- id: gitlint
|
||||||
|
stages: [commit-msg]
|
||||||
|
- id: gitlint-ci
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.4.0
|
||||||
|
hooks:
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-json
|
||||||
|
- id: check-xml
|
||||||
|
- id: check-yaml
|
||||||
|
- id: trailing-whitespace
|
||||||
|
args: [--markdown-linebreak-ext=md]
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
exclude: ".key$"
|
||||||
|
|
||||||
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
|
rev: v0.9.0.2
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
|
||||||
|
- repo: https://github.com/golangci/golangci-lint
|
||||||
|
rev: v1.51.2
|
||||||
|
hooks:
|
||||||
|
- id: golangci-lint
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: go-unit-tests
|
||||||
|
name: go unit tests
|
||||||
|
entry: make test
|
||||||
|
pass_filenames: false
|
||||||
|
types: [go]
|
||||||
|
language: system
|
Loading…
Reference in a new issue