Skip to content

Commit 5473539

Browse files
Bharath-codeclaude
andcommitted
chore: upgrade to Go 1.26 and remove dead code for golangci-lint
Bump the go directive to 1.26.0 and switch the release workflow to go-version-file so it tracks go.mod. Remove unused style vars and the dead logo()/getPanelHelp() functions flagged by golangci-lint's unused linter; golangci-lint now reports 0 issues. Co-Authored-By: Claude Opus 4.8 <[email protected]>
1 parent 4bd7e9b commit 5473539

4 files changed

Lines changed: 6 additions & 84 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.20'
21+
go-version-file: go.mod
2222

2323
- name: Run GoReleaser
2424
uses: goreleaser/goreleaser-action@v5

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Bharath-code/git-scope
22

3-
go 1.20
3+
go 1.26.0
44

55
require (
66
github.com/charmbracelet/bubbles v0.18.0

internal/tui/panel.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ var (
2727
heatmapLevel3 = lipgloss.NewStyle().Foreground(lipgloss.Color("#26a641")) // Medium-High
2828
heatmapLevel4 = lipgloss.NewStyle().Foreground(lipgloss.Color("#39d353")) // High
2929

30-
// Panel styling - Tuimorphic borders
31-
panelBorderStyle = lipgloss.NewStyle().
32-
BorderStyle(lipgloss.RoundedBorder()).
33-
BorderForeground(lipgloss.Color("#30363d")).
34-
Padding(0, 1)
35-
3630
// Active panel border (when focused)
3731
panelBorderActiveStyle = lipgloss.NewStyle().
3832
BorderStyle(lipgloss.RoundedBorder()).
@@ -186,26 +180,8 @@ func getHeatmapBlock(level int) string {
186180
}
187181
}
188182

189-
// getPanelHelp returns help text for the active panel
190-
func getPanelHelp(panel PanelType) string {
191-
switch panel {
192-
case PanelGrass:
193-
return helpItem("g", "close") + " • " + helpItem("esc", "close")
194-
case PanelDisk:
195-
return helpItem("d", "close") + " • " + helpItem("esc", "close")
196-
case PanelTimeline:
197-
return helpItem("t", "close") + " • " + helpItem("esc", "close")
198-
default:
199-
return ""
200-
}
201-
}
202-
203183
// Disk usage color palette (warm gradient for size visualization)
204184
var (
205-
diskBarLow = lipgloss.NewStyle().Foreground(lipgloss.Color("#22c55e")) // Green - small
206-
diskBarMed = lipgloss.NewStyle().Foreground(lipgloss.Color("#eab308")) // Yellow - medium
207-
diskBarHigh = lipgloss.NewStyle().Foreground(lipgloss.Color("#f97316")) // Orange - large
208-
diskBarMax = lipgloss.NewStyle().Foreground(lipgloss.Color("#ef4444")) // Red - huge
209185
diskNameStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFFFFF"))
210186
diskSizeStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#A78BFA")).Bold(true)
211187
diskNodeSizeStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#F97316")).Bold(true) // Orange for node_modules value

internal/tui/styles.go

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,17 @@ var (
2121
errorColor = lipgloss.Color("#ef4444") // Red - error
2222

2323
// Background layers (dark theme - GitHub style)
24-
bgDark = lipgloss.Color("#0d1117") // Darkest - main bg
25-
bgPanel = lipgloss.Color("#161b22") // Panel backgrounds
26-
bgSurface = lipgloss.Color("#21262d") // Elevated surfaces
27-
borderColor = lipgloss.Color("#30363d") // Subtle borders
28-
borderActive = lipgloss.Color("#7C3AED") // Active/focused borders
24+
bgSurface = lipgloss.Color("#21262d") // Elevated surfaces
25+
borderColor = lipgloss.Color("#30363d") // Subtle borders
2926

3027
// Text hierarchy
3128
textPrimary = lipgloss.Color("#f0f6fc") // Primary text
3229
textSecondary = lipgloss.Color("#8b949e") // Secondary/muted
3330
textTertiary = lipgloss.Color("#6e7681") // Tertiary/hints
3431

3532
// Legacy aliases for compatibility
36-
bgColor = bgPanel
37-
surfaceColor = bgSurface
38-
textColor = textPrimary
39-
mutedColor = textSecondary
40-
dangerColor = errorColor
33+
textColor = textPrimary
34+
mutedColor = textSecondary
4135
)
4236

4337
// Application styles
@@ -54,19 +48,6 @@ var (
5448
Padding(0, 2).
5549
MarginBottom(1)
5650

57-
// Logo ASCII art style
58-
logoStyle = lipgloss.NewStyle().
59-
Foreground(primaryColor).
60-
Bold(true)
61-
62-
// Header bar style (logo + version)
63-
headerBarStyle = lipgloss.NewStyle().
64-
Foreground(primaryDim).
65-
Bold(true)
66-
67-
versionStyle = lipgloss.NewStyle().
68-
Foreground(textTertiary)
69-
7051
// Subtitle with stats
7152
subtitleStyle = lipgloss.NewStyle().
7253
Foreground(mutedColor).
@@ -91,18 +72,6 @@ var (
9172
Padding(0, 1).
9273
Bold(true)
9374

94-
// Table styles - bordered container
95-
tableContainerStyle = lipgloss.NewStyle().
96-
BorderStyle(lipgloss.RoundedBorder()).
97-
BorderForeground(borderColor).
98-
Padding(0, 1)
99-
100-
// Dashboard border style
101-
dashboardBorderStyle = lipgloss.NewStyle().
102-
BorderStyle(lipgloss.RoundedBorder()).
103-
BorderForeground(borderColor).
104-
Padding(0, 1)
105-
10675
// Keybindings bar styles (Tuimorphic - always visible at bottom)
10776
keyBindingsBarStyle = lipgloss.NewStyle().
10877
Foreground(textSecondary).
@@ -152,9 +121,6 @@ var (
152121
Foreground(secondaryColor).
153122
Bold(true)
154123

155-
loadingSpinnerStyle = lipgloss.NewStyle().
156-
Foreground(primaryColor)
157-
158124
// Scanning paths list
159125
pathStyle = lipgloss.NewStyle().
160126
Foreground(textColor).
@@ -164,16 +130,6 @@ var (
164130
Foreground(primaryColor).
165131
Bold(true)
166132

167-
// Repo row indicators
168-
dirtyIndicator = lipgloss.NewStyle().
169-
Foreground(dirtyColor).
170-
Bold(true).
171-
Render("●")
172-
173-
cleanIndicator = lipgloss.NewStyle().
174-
Foreground(cleanColor).
175-
Render("○")
176-
177133
// Compact legend styles
178134
dirtyDotStyle = lipgloss.NewStyle().
179135
Foreground(dirtyColor).
@@ -191,16 +147,6 @@ func helpItem(key, desc string) string {
191147
return helpKeyStyle.Render(key) + helpDescStyle.Render(" "+desc)
192148
}
193149

194-
// Logo returns the ASCII art logo
195-
func logo() string {
196-
return logoStyle.Render(`
197-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
198-
┃ ╔═╗╦╔╦╗ ╔═╗╔═╗╔═╗╔═╗╔═╗ ┃
199-
┃ ║ ╦║ ║───╚═╗║ ║ ║╠═╝║╣ ┃
200-
┃ ╚═╝╩ ╩ ╚═╝╚═╝╚═╝╩ ╚═╝ ┃
201-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`)
202-
}
203-
204150
// Simpler logo for compact mode
205151
func compactLogo() string {
206152
return titleStyle.Render(" 🔍 git-scope ")

0 commit comments

Comments
 (0)