Skip to content

Conversation

@babakks
Copy link
Contributor

@babakks babakks commented Jan 4, 2026

Fixes #4856

Tested with a local build of Golangci-lint, cloned from latest main.

Unrelated to this, but seems like golines in my build of Golangci-lint complains about some long lines. Expand to see more. I can try fixing them as well as they seem to be all cosmetic changes. Let me know, anyway.

Details

internal/chezmoi/sourcestate.go:666:1: File is not properly formatted (golines)
                        if err := PersistentStateSet(persistentState, EntryStateBucket, sourceUpdate.destAbsPath.Bytes(), sourceUpdate.entryState); err != nil {
^
internal/cmd/githubtemplatefuncs.go:170:1: File is not properly formatted (golines)
        if err := chezmoi.PersistentStateSet(c.persistentState, gitHubVersionReleaseStateBucket, gitHubVersionReleaseKey, &gitHubLatestReleaseState{
^
internal/cmd/inittemplatefuncs_test.go:338:1: File is not properly formatted (golines)
                                assert.Equal(t, tc.expected, config.promptMultichoiceInteractiveTemplateFunc(tc.prompt, tc.multichoices, tc.args...))
^
internal/cmd/mergecmd.go:97:1: File is not properly formatted (golines)
        if targetStateEntry, err = sourceStateEntry.TargetStateEntry(c.destSystem, c.DestDirAbsPath.Join(targetRelPath)); err != nil {
^
4 issues:
* golines: 4

@babakks babakks force-pushed the babakks/use-doc-links branch from ccdbd17 to dfae10f Compare January 4, 2026 16:52
@babakks babakks force-pushed the babakks/use-doc-links branch from dfae10f to 9f0ff45 Compare January 4, 2026 16:52
@babakks
Copy link
Contributor Author

babakks commented Jan 4, 2026

Force pushed to fix commit message casing.

@twpayne twpayne merged commit f7e8e05 into twpayne:master Jan 4, 2026
26 checks passed
@twpayne
Copy link
Owner

twpayne commented Jan 4, 2026

Thank you very much for this PR!

Unrelated to this, but seems like golines in my build of Golangci-lint complains about some long lines. Expand to see more. I can try fixing them as well as they seem to be all cosmetic changes. Let me know, anyway.

This is slightly weird. I've configured golines to allow lines up to 128 characters long, and it doesn't complain for me, but the four lines you identify are all over 128 characters long. I'm relying on golangci-lint fmt to fix these. The real underlying bug here is why golangci-lint run is not detecting them in the chezmoi's current CI.

@babakks
Copy link
Contributor Author

babakks commented Jan 4, 2026

No worries. Maybe it's due to this update in Golangci-lint.

@babakks babakks deleted the babakks/use-doc-links branch January 4, 2026 17:31
@twpayne
Copy link
Owner

twpayne commented Jan 4, 2026

Ah, thanks! If you want to open a PR for this, feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New godoclint rule and potential breaks with next Golangci-lint release

2 participants