Skip to content
Snippets Groups Projects
Commit 54fce285 authored by Pavel Pogorelchuk's avatar Pavel Pogorelchuk
Browse files

Merge branch 'PD-4965' into 'master'

refactor:PD-4965:golangci-lint умножен на ноль

Closes PD-4965

See merge request !148
parents ed771aea 079e298e
No related branches found
Tags v1.24.104
1 merge request!148refactor:PD-4965:golangci-lint умножен на ноль
Pipeline #30554 passed with stages
in 1 minute and 2 seconds
#!/bin/bash
# Linter
golangci-lint run --fix
if [ $? -ne 0 ]; then
echo "Linting failed. Please fix the issues."
exit 1
fi
\ No newline at end of file
......@@ -3,7 +3,11 @@
COMMIT_MSG_FILE=$1
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
GIT_CHANGES=$(tail -n +5 $COMMIT_MSG_FILE)
COMMIT_MSG=$(cat $COMMIT_MSG_FILE)
if [ -n "$COMMIT_MSG" ]; then
exit 0
fi
echo -e ':'"$BRANCH_NAME"':' >"$COMMIT_MSG_FILE"
echo >>"$COMMIT_MSG_FILE"
......
......@@ -4,13 +4,9 @@ include:
- project: 'devops-pub/templates'
ref: master
file: '/notify.yml'
- project: 'devops-pub/templates'
ref: master
file: '/rewiewdog.yml'
stages:
- lint_review
- test
- coverage
......
run:
tests: false
timeout: 10m
output:
sort-results: true
linters:
enable:
- wsl
- prealloc
- nosprintfhostport
- noctx
- nilnil
- nilerr
- gosec
- gocheckcompilerdirectives
- gochecknoinits
- gochecknoglobals
- goconst
- bodyclose
- gofmt
- gofumpt
issues:
max-issues-per-linter: 999
max-same-issues: 0
linters-settings:
wsl:
strict-append: false
allow-assign-and-call: false
allow-cuddle-with-calls: ["Lock", "RLock"]
force-err-cuddling: true
error-variable-names: ["err"]
golangci-lint run
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment