Skip to content

Commit 7f53930

Browse files
committed
chore: merge main
2 parents 4d15621 + 7608512 commit 7f53930

File tree

23 files changed

+289
-129
lines changed

23 files changed

+289
-129
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @charmbracelet/everyone

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels:
8+
- "dependencies"
9+
commit-message:
10+
prefix: "chore"
11+
include: "scope"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"
16+
labels:
17+
- "dependencies"
18+
commit-message:
19+
prefix: "chore"
20+
include: "scope"
21+
- package-ecosystem: "docker"
22+
directory: "/"
23+
schedule:
24+
interval: "daily"
25+
labels:
26+
- "dependencies"
27+
commit-message:
28+
prefix: "chore"
29+
include: "scope"

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2121
with:
2222
go-version: '1.21'
2323

.github/workflows/goreleaser.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
13
name: goreleaser
24

35
on:
@@ -21,6 +23,11 @@ jobs:
2123
fury_token: ${{ secrets.FURY_TOKEN }}
2224
nfpm_gpg_key: ${{ secrets.NFPM_GPG_KEY }}
2325
nfpm_passphrase: ${{ secrets.NFPM_PASSPHRASE }}
26+
macos_sign_p12: ${{ secrets.MACOS_SIGN_P12 }}
27+
macos_sign_password: ${{ secrets.MACOS_SIGN_PASSWORD }}
28+
macos_notary_issuer_id: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
29+
macos_notary_key_id: ${{ secrets.MACOS_NOTARY_KEY_ID }}
30+
macos_notary_key: ${{ secrets.MACOS_NOTARY_KEY }}
2431
homebrew:
2532
name: Bump Homebrew formula
2633
runs-on: ubuntu-latest

.github/workflows/lint-soft.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: lint-soft
2+
on:
3+
push:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
9+
pull-requests: read
10+
11+
jobs:
12+
golangci:
13+
name: lint-soft
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Install Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: ^1
20+
21+
- uses: actions/checkout@v4
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@v6
24+
with:
25+
# Optional: golangci-lint command line arguments.
26+
args: --config .golangci-soft.yml --issues-exit-code=0
27+
# Optional: show only new issues if it's a pull request. The default value is `false`.
28+
only-new-issues: true

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: lint
2+
on:
3+
push:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
9+
pull-requests: read
10+
11+
jobs:
12+
golangci:
13+
name: lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Install Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: ^1
20+
21+
- uses: actions/checkout@v4
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@v6
24+
with:
25+
# Optional: golangci-lint command line arguments.
26+
#args:
27+
# Optional: show only new issues if it's a pull request. The default value is `false`.
28+
only-new-issues: true

.golangci-soft.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
run:
2+
tests: false
3+
4+
issues:
5+
include:
6+
- EXC0001
7+
- EXC0005
8+
- EXC0011
9+
- EXC0012
10+
- EXC0013
11+
12+
max-issues-per-linter: 0
13+
max-same-issues: 0
14+
15+
linters:
16+
enable:
17+
- exhaustive
18+
- goconst
19+
- godot
20+
- godox
21+
- gomoddirectives
22+
- goprintffuncname
23+
- misspell
24+
- nakedret
25+
- nestif
26+
- noctx
27+
- nolintlint
28+
- prealloc
29+
- wrapcheck
30+
31+
# disable default linters, they are already enabled in .golangci.yml
32+
disable:
33+
- errcheck
34+
- gosimple
35+
- govet
36+
- ineffassign
37+
- staticcheck
38+
- typecheck
39+
- unused

.golangci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
run:
2+
tests: false
3+
4+
issues:
5+
include:
6+
- EXC0001
7+
- EXC0005
8+
- EXC0011
9+
- EXC0012
10+
- EXC0013
11+
12+
max-issues-per-linter: 0
13+
max-same-issues: 0
14+
15+
linters:
16+
enable:
17+
- bodyclose
18+
- goimports
19+
- gosec
20+
- nilerr
21+
- predeclared
22+
- revive
23+
- rowserrcheck
24+
- sqlclosecheck
25+
- tparallel
26+
- unconvert
27+
- unparam
28+
- whitespace

ansi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55

66
"github.com/beevik/etree"
7-
"github.com/charmbracelet/x/exp/term/ansi"
7+
"github.com/charmbracelet/x/ansi"
88
"github.com/mattn/go-runewidth"
99
)
1010

config.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func expandPadding(p []float64, scale float64) []float64 {
8484
return []float64{p[top] * scale, p[right] * scale, p[bottom] * scale, p[left] * scale}
8585
default:
8686
return []float64{0, 0, 0, 0}
87-
8887
}
8988
}
9089

@@ -102,7 +101,7 @@ const (
102101
var userConfigPath = filepath.Join(xdg.ConfigHome, "freeze", "user.json")
103102

104103
func loadUserConfig() (fs.File, error) {
105-
return os.Open(userConfigPath)
104+
return os.Open(userConfigPath) //nolint: wrapcheck
106105
}
107106

108107
func saveUserConfig(config Config) error {
@@ -112,19 +111,19 @@ func saveUserConfig(config Config) error {
112111

113112
err := os.MkdirAll(filepath.Dir(userConfigPath), os.ModePerm)
114113
if err != nil {
115-
return err
114+
return err //nolint: wrapcheck
116115
}
117116
f, err := os.Create(userConfigPath)
118117
if err != nil {
119-
return err
118+
return err //nolint: wrapcheck
120119
}
121120
b, err := json.Marshal(config)
122121
if err != nil {
123-
return err
122+
return err //nolint: wrapcheck
124123
}
125124
_, err = f.Write(b)
126125

127126
printFilenameOutput(userConfigPath)
128127

129-
return err
128+
return err //nolint: wrapcheck
130129
}

0 commit comments

Comments
 (0)