Commit 082da09
Fix dotfiles branch resolution and disk space calculation (#25)
* fix(ci): resolve dotfiles default branch via remote and silence Linux gosec
resolveBranch fell back to "main" whenever local origin/HEAD wasn't a
symbolic ref (e.g. cloned from an empty bare), causing
TestClone_DetachedHeadFallback and any user with a master-default repo
to fail with "ambiguous argument 'origin/main'". Add a final fallback
that consults the remote via `git ls-remote --symref origin HEAD`.
Also annotate the syscall.Statfs block-size conversion in
brew.CheckDiskSpace so `golangci-lint run` is clean on Linux too
(stat.Bsize is int64 on linux, uint32 on darwin — value is always
non-negative).
* ci: bump golangci-lint-action to v7 and migrate labeler config to v5
- golangci/golangci-lint-action@v6 only supports golangci-lint v1; with the
recent bump to v2.11.4 it errors out at startup. Bump the action to v7,
which is the v2-compatible release.
- actions/labeler@v5 requires the new `changed-files` schema. The current
config uses the v4 flat-glob form, so every PR fails labeling with
"found unexpected type for label 'catalog'". Convert each entry to the
v5 `changed-files: any-glob-to-any-file` form.
* ci(lint): move dir exclusions out of run.exclude-dirs (rejected by v2.11.4)
golangci-lint v2.11.4 enforces a stricter schema than 2.5 and rejects the
deprecated `run.exclude-dirs` key with "additional properties 'exclude-dirs'
not allowed". Move the directory list to `linters.exclusions.paths` (the
v2 location) and drop the now-redundant per-path testutil rule.
* fix(snapshot): CaptureNpm returns []string{} instead of nil when no globals
When npm is installed but `npm list -g --depth=0 --parseable` returns
only the prefix line (or only npm/corepack), the loop never appends and
`var packages []string` stays nil. TestCaptureNpm_NoPanic asserts the
returned slice is not nil, so the test fails on macOS-CI runners where
npm is present but has no user-installed globals. Initialise as an empty
slice to match the early-return contract.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5716c32 commit 082da09
File tree
6 files changed
+46
-20
lines changed- .github
- workflows
- internal
- brew
- dotfiles
- snapshot
6 files changed
+46
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | | - | |
15 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
23 | 37 | | |
24 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
162 | 175 | | |
163 | 176 | | |
164 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
0 commit comments