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
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: 1.26
go-version: 1.27

- name: Build
run: go build -v ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-go@v7
with:
go-version: 1.26
go-version: 1.27
- uses: actions/checkout@v7
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v7
with:
go-version: 1.26
go-version: 1.27
-
name: Set GOPATH
# temporary fix
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ linters:
- noinlineerr
- wsl
- gomodguard
- exhaustruct # deprecated, replaced by exhaustruct_v5
4 changes: 2 additions & 2 deletions cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
)

func NewEditCommand(conf *config.Config) *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "edit <id>",
Short: "Open the ADR with number <id> in the default editor",
Long: `Open the ADR with the given number in the default editor.

The editor is determined by the $EDITOR environment variable. If $EDITOR is
not set, the command will fail.`,
Args: cobra.ExactArgs(1),
Args: cobra.ExactArgs(1),
Run: func(_ *cobra.Command, args []string) {
ctx := context.TODO()

Expand Down
2 changes: 1 addition & 1 deletion cmd/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func NewFindCommand(conf *config.Config) *cobra.Command {

var format string

//nolint:exhaustruct
//nolint:exhaustruct_v5
cmd := &cobra.Command{
Use: "find <query>",
Short: "Find ADRs matching a query",
Expand Down
6 changes: 3 additions & 3 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func NewInitConfigCommand() *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "init [path]",
Short: "Initialize the ADR path (default is `docs/adr`)",
Expand All @@ -22,7 +22,7 @@ is found.

The path argument sets the ADR directory relative to the project root
(default: docs/adr).`,
Args: cobra.MaximumNArgs(1),
Args: cobra.MaximumNArgs(1),
Run: func(_ *cobra.Command, args []string) {
path := "docs/adr"

Expand All @@ -45,7 +45,7 @@ The path argument sets the ADR directory relative to the project root
}

func NewInitCommand(conf *config.Config) *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "init",
Short: "Initialize the ADR path",
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func NewListCommand(conf *config.Config) *cobra.Command {
var format string

//nolint:exhaustruct
//nolint:exhaustruct_v5
cmd := &cobra.Command{
Use: "list",
Short: "List all ADRs with their id, date and status",
Expand Down
2 changes: 1 addition & 1 deletion cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func NewNewCommand(conf *config.Config) *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "new [title]",
Aliases: []string{"add", "create"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func NewShowCommand(conf *config.Config) *cobra.Command {
var format string

//nolint:exhaustruct
//nolint:exhaustruct_v5
cmd := &cobra.Command{
Use: "show <id>",
Aliases: []string{"view"},
Expand Down
4 changes: 2 additions & 2 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func NewUpdateCommand(conf *config.Config) *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "update <id> <status>",
Short: "Update the ADR with number <id> to status <status>",
Expand All @@ -20,7 +20,7 @@ func NewUpdateCommand(conf *config.Config) *cobra.Command {
Valid statuses are: proposed, accepted, deprecated, superseded.

The index (README.md) is regenerated automatically after the update.`,
Args: cobra.ExactArgs(2), //nolint:mnd
Args: cobra.ExactArgs(2), //nolint:mnd
Run: func(_ *cobra.Command, args []string) {
number, err := strconv.Atoi(args[0])
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func NewVersionCommand() *cobra.Command {
//nolint:exhaustruct
//nolint:exhaustruct_v5
return &cobra.Command{
Use: "version",
Short: "Show the version information",
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newRootCommand() *cobra.Command {
log.Fatalf("couldn't read config: %v", err)
}

//nolint:exhaustruct
//nolint:exhaustruct_v5
root := &cobra.Command{
Use: os.Args[0],
Short: "A command line tool to maintain Architecture Decision Records",
Expand Down
Loading