Pre-commit and makefile fixes #209
5 changed files with 14 additions and 20 deletions
10
.gitlint
10
.gitlint
|
@ -1,10 +0,0 @@
|
||||||
[general]
|
|
||||||
fail-without-commits=true
|
|
||||||
contrib=CC1
|
|
||||||
|
|
||||||
[title-match-regex]
|
|
||||||
regex=^\[\#[0-9Xx]+\]\s
|
|
||||||
|
|
||||||
[ignore-by-title]
|
|
||||||
regex=^Release(.*)
|
|
||||||
ignore=title-match-regex
|
|
|
@ -18,6 +18,15 @@ repos:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
exclude: "(.key|.interp|.tokens)$"
|
exclude: "(.key|.interp|.tokens)$"
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: go-unit-tests
|
||||||
|
name: go unit tests
|
||||||
|
entry: make test GOFLAGS=''
|
||||||
|
pass_filenames: false
|
||||||
|
types: [go]
|
||||||
|
language: system
|
||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: make-lint
|
- id: make-lint
|
||||||
|
@ -25,9 +34,3 @@ repos:
|
||||||
entry: make lint
|
entry: make lint
|
||||||
language: system
|
language: system
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
||||||
- repo: https://github.com/jorisroovers/gitlint
|
|
||||||
rev: v0.18.0
|
|
||||||
hooks:
|
|
||||||
- id: gitlint
|
|
||||||
stages: [commit-msg]
|
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -2,14 +2,15 @@
|
||||||
|
|
||||||
ANTLR_VERSION="4.13.0"
|
ANTLR_VERSION="4.13.0"
|
||||||
TMP_DIR := .cache
|
TMP_DIR := .cache
|
||||||
LINT_VERSION ?= 1.55.0
|
LINT_VERSION ?= 1.56.2
|
||||||
TRUECLOUDLAB_LINT_VERSION ?= 0.0.2
|
TRUECLOUDLAB_LINT_VERSION ?= 0.0.2
|
||||||
OUTPUT_LINT_DIR ?= $(shell pwd)/bin
|
OUTPUT_LINT_DIR ?= $(shell pwd)/bin
|
||||||
LINT_DIR = $(OUTPUT_LINT_DIR)/golangci-lint-$(LINT_VERSION)-v$(TRUECLOUDLAB_LINT_VERSION)
|
LINT_DIR = $(OUTPUT_LINT_DIR)/golangci-lint-$(LINT_VERSION)-v$(TRUECLOUDLAB_LINT_VERSION)
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
|
test: GOFLAGS ?= "-cover -count=1"
|
||||||
test:
|
test:
|
||||||
@go test ./... -cover -count=1
|
@GOFLAGS=$(GOFLAGS) go test ./...
|
||||||
|
|
||||||
# Pull go dependencies
|
# Pull go dependencies
|
||||||
dep:
|
dep:
|
||||||
|
|
|
@ -2049,7 +2049,7 @@ func (p *Pool) updateNodesHealth(ctx context.Context, buffers [][]float64) {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
|
||||||
bufferWeights := buffers[i]
|
bufferWeights := buffers[i]
|
||||||
go func(i int, innerPool *innerPool) {
|
go func(i int, _ *innerPool) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
p.updateInnerNodesHealth(ctx, i, bufferWeights)
|
p.updateInnerNodesHealth(ctx, i, bufferWeights)
|
||||||
}(i, inner)
|
}(i, inner)
|
||||||
|
|
|
@ -677,7 +677,7 @@ func (p *Pool) updateNodesHealth(ctx context.Context, buffers [][]bool) {
|
||||||
for i, inner := range p.innerPools {
|
for i, inner := range p.innerPools {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
|
||||||
go func(i int, innerPool *innerPool) {
|
go func(i int, _ *innerPool) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
p.updateInnerNodesHealth(ctx, i, buffers[i])
|
p.updateInnerNodesHealth(ctx, i, buffers[i])
|
||||||
}(i, inner)
|
}(i, inner)
|
||||||
|
|
Loading…
Reference in a new issue