Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/scripts/get-yamlfmt.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/back-compat-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"
- ".github/workflows/back-compat-pr.yml"

permissions:
contents: read

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
check-back-compat:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/back-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: read

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
check-back-compat:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"
- ".github/workflows/build.yml"

permissions:
contents: read

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
build:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/lint-yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get yamlfmt
run: |
LATEST_VERSION=$(curl -s https://api.github.com/repos/google/yamlfmt/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//')
./.github/scripts/get-yamlfmt.sh "Linux" "x86_64" "$LATEST_VERSION"
- name: Install yamlfmt
uses: jaxxstorm/action-install-gh-release@4304621e8c48d66093a8a214af5d5b5bc3b3d943
with:
repo: google/yamlfmt
tag: v0.16.0
- name: Run yamlfmt
run: ./yamlfmt -lint -quiet $(find . -name '*.yml')
run: yamlfmt -lint -quiet $(find . -name '*.yml')
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"
- ".github/workflows/lint.yml"

permissions:
contents: read

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
lint:
Expand All @@ -26,6 +26,6 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.64
version: v2.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
id-token: write

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".github/workflows/test.yml"

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
contents: read

env:
GO_VERSION: '1.24.0'
GO_VERSION: '1.24.2'

jobs:
vulncheck:
Expand Down
104 changes: 60 additions & 44 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,77 @@
version: "2"
linters:
enable:
- errcheck
- errname
- errorlint
- goconst
- gofumpt
- gosimple
- govet
- ineffassign
- intrange
- nilerr
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- testifylint
- thelper
- unconvert
- unused
- usestdlibvars
- wastedassign
linters-settings:
revive:
rules:
# defaults
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: "*testing.T"
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: var-declaration
- name: var-naming
# additional
- name: unnecessary-stmt
- name: deep-exit
- name: confusing-naming
- name: unused-receiver
- name: unhandled-error
arguments: ["fmt.Print", "fmt.Printf", "fmt.Fprintf", "fmt.Fprint"]
settings:
revive:
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: '*testing.T'
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: var-declaration
- name: var-naming
- name: unnecessary-stmt
- name: deep-exit
- name: confusing-naming
- name: unused-receiver
- name: unhandled-error
arguments:
- fmt.Print
- fmt.Printf
- fmt.Fprintf
- fmt.Fprint
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofumpt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
23 changes: 13 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
module github.com/dhth/hours

go 1.24.0
go 1.24.2

require (
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.3.3
github.com/charmbracelet/lipgloss v1.0.0
github.com/charmbracelet/bubbletea v1.3.4
github.com/charmbracelet/lipgloss v1.1.0
github.com/dustin/go-humanize v1.0.1
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.9.1
github.com/stretchr/testify v1.10.0
modernc.org/sqlite v1.35.0
modernc.org/sqlite v1.37.0
)

require (
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/colorprofile v0.3.0 // indirect
github.com/charmbracelet/x/ansi v0.8.0 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
Expand All @@ -35,12 +37,13 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sahilm/fuzzy v0.1.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.23.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.61.13 // indirect
modernc.org/libc v1.62.1 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.8.2 // indirect
modernc.org/memory v1.9.1 // indirect
)
Loading