detached 179fb63

chore(tools): update golangci-lint to v2.13.2

commit
179fb63724bcc16a36320d7297f11b73e102689c
author
brice · · 2026-08-29 11:23 UTC
parent
f2f6f15
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +22 -8
M Makefile +3 -2
@@ -14,7 +14,7 @@ MAIN_PATH=./cmd/dumber
1414 DIST_DIR=dist
1515 LOCAL_BIN_DIR?=$(HOME)/.local/bin
1616 TOOL_BIN_DIR?=$(shell go env GOPATH)/bin
17-GOLANGCI_LINT_VERSION?=v2.12.2
17+GOLANGCI_LINT_VERSION?=v2.13.2
1818 STATICCHECK_VERSION?=v0.7.0
1919
2020 # Detect number of CPU cores for parallel compilation
@@ -165,7 +165,8 @@ install-golangci-lint: ## Install pinned golangci-lint
165165 # Build the pinned version with the active Go toolchain instead of using the
166166 # upstream install.sh helper, which currently misidentifies release assets now
167167 # that golangci-lint publishes sibling .sbom.json files for each tarball.
168- GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
168+ # Run outside this module so Go resolves the requested tool version independently.
169+ cd "$${TMPDIR:-/tmp}" && GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
169170
170171 install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain
171172 @echo "Installing staticcheck $(STATICCHECK_VERSION)..."
@@ -14,7 +14,7 @@ MAIN_PATH=./cmd/dumber
14 DIST_DIR=dist14 DIST_DIR=dist
15 LOCAL_BIN_DIR?=$(HOME)/.local/bin15 LOCAL_BIN_DIR?=$(HOME)/.local/bin
16 TOOL_BIN_DIR?=$(shell go env GOPATH)/bin16 TOOL_BIN_DIR?=$(shell go env GOPATH)/bin
17-GOLANGCI_LINT_VERSION?=v2.12.217+GOLANGCI_LINT_VERSION?=v2.13.2
18 STATICCHECK_VERSION?=v0.7.018 STATICCHECK_VERSION?=v0.7.0
19 19
20 # Detect number of CPU cores for parallel compilation20 # Detect number of CPU cores for parallel compilation
@@ -165,7 +165,8 @@ install-golangci-lint: ## Install pinned golangci-lint
165 # Build the pinned version with the active Go toolchain instead of using the165 # Build the pinned version with the active Go toolchain instead of using the
166 # upstream install.sh helper, which currently misidentifies release assets now166 # upstream install.sh helper, which currently misidentifies release assets now
167 # that golangci-lint publishes sibling .sbom.json files for each tarball.167 # that golangci-lint publishes sibling .sbom.json files for each tarball.
168- GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)168+ # Run outside this module so Go resolves the requested tool version independently.
169+ cd "$${TMPDIR:-/tmp}" && GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
169 170
170 install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain171 install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain
171 @echo "Installing staticcheck $(STATICCHECK_VERSION)..."172 @echo "Installing staticcheck $(STATICCHECK_VERSION)..."
M internal/ui/theme/palette.go +19 -6
@@ -279,7 +279,18 @@ func (p Palette) ToCSSVars() string {
279279 return sb.String()
280280 }
281281
282-const minimumReadableContrast = 4.5
282+const (
283+ minimumReadableContrast = 4.5
284+ contrastLuminanceOffset = 0.05
285+ sRGBLinearThreshold = 0.04045
286+ sRGBLinearDivisor = 12.92
287+ sRGBGammaOffset = 0.055
288+ sRGBGammaScale = 1.055
289+ sRGBGammaExponent = 2.4
290+ redLuminanceWeight = 0.2126
291+ greenLuminanceWeight = 0.7152
292+ blueLuminanceWeight = 0.0722
293+)
283294
284295 func readableTextColor(background, preferred string) string {
285296 if contrastRatio(background, preferred) >= minimumReadableContrast {
@@ -297,19 +308,21 @@ func contrastRatio(first, second string) float64 {
297308 if firstLuminance < secondLuminance {
298309 firstLuminance, secondLuminance = secondLuminance, firstLuminance
299310 }
300- return (firstLuminance + 0.05) / (secondLuminance + 0.05)
311+ return (firstLuminance + contrastLuminanceOffset) / (secondLuminance + contrastLuminanceOffset)
301312 }
302313
303314 func relativeLuminance(color string) float64 {
304315 r, g, b, _ := HexToRGBA(color)
305316 linearize := func(channel float32) float64 {
306317 value := float64(channel)
307- if value <= 0.04045 {
308- return value / 12.92
318+ if value <= sRGBLinearThreshold {
319+ return value / sRGBLinearDivisor
309320 }
310- return math.Pow((value+0.055)/1.055, 2.4)
321+ return math.Pow((value+sRGBGammaOffset)/sRGBGammaScale, sRGBGammaExponent)
311322 }
312- return 0.2126*linearize(r) + 0.7152*linearize(g) + 0.0722*linearize(b)
323+ return redLuminanceWeight*linearize(r) +
324+ greenLuminanceWeight*linearize(g) +
325+ blueLuminanceWeight*linearize(b)
313326 }
314327
315328 // ToWebCSSVars generates CSS custom properties for web UI (Tailwind compatibility).
@@ -279,7 +279,18 @@ func (p Palette) ToCSSVars() string {
279 return sb.String()279 return sb.String()
280 }280 }
281 281
282-const minimumReadableContrast = 4.5282+const (
283+ minimumReadableContrast = 4.5
284+ contrastLuminanceOffset = 0.05
285+ sRGBLinearThreshold = 0.04045
286+ sRGBLinearDivisor = 12.92
287+ sRGBGammaOffset = 0.055
288+ sRGBGammaScale = 1.055
289+ sRGBGammaExponent = 2.4
290+ redLuminanceWeight = 0.2126
291+ greenLuminanceWeight = 0.7152
292+ blueLuminanceWeight = 0.0722
293+)
283 294
284 func readableTextColor(background, preferred string) string {295 func readableTextColor(background, preferred string) string {
285 if contrastRatio(background, preferred) >= minimumReadableContrast {296 if contrastRatio(background, preferred) >= minimumReadableContrast {
@@ -297,19 +308,21 @@ func contrastRatio(first, second string) float64 {
297 if firstLuminance < secondLuminance {308 if firstLuminance < secondLuminance {
298 firstLuminance, secondLuminance = secondLuminance, firstLuminance309 firstLuminance, secondLuminance = secondLuminance, firstLuminance
299 }310 }
300- return (firstLuminance + 0.05) / (secondLuminance + 0.05)311+ return (firstLuminance + contrastLuminanceOffset) / (secondLuminance + contrastLuminanceOffset)
301 }312 }
302 313
303 func relativeLuminance(color string) float64 {314 func relativeLuminance(color string) float64 {
304 r, g, b, _ := HexToRGBA(color)315 r, g, b, _ := HexToRGBA(color)
305 linearize := func(channel float32) float64 {316 linearize := func(channel float32) float64 {
306 value := float64(channel)317 value := float64(channel)
307- if value <= 0.04045 {318+ if value <= sRGBLinearThreshold {
308- return value / 12.92319+ return value / sRGBLinearDivisor
309 }320 }
310- return math.Pow((value+0.055)/1.055, 2.4)321+ return math.Pow((value+sRGBGammaOffset)/sRGBGammaScale, sRGBGammaExponent)
311 }322 }
312- return 0.2126*linearize(r) + 0.7152*linearize(g) + 0.0722*linearize(b)323+ return redLuminanceWeight*linearize(r) +
324+ greenLuminanceWeight*linearize(g) +
325+ blueLuminanceWeight*linearize(b)
313 }326 }
314 327
315 // ToWebCSSVars generates CSS custom properties for web UI (Tailwind compatibility).328 // ToWebCSSVars generates CSS custom properties for web UI (Tailwind compatibility).

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close