Commit Graph

30 Commits

Author SHA1 Message Date
Kyle Welch 3228cc72b4 docs: document GitLab auth for private Go modules (#44371)
Private GitLab projects need a `hostType: "go"` host rule with a username and password so Renovate can authenticate the go-get request it uses to resolve a module's source repository. Without it GitLab returns a truncated go-import path for the unauthenticated request and the version lookup 404s.

Came up in discussion #37624 after the resolution change in #36963.
2026-09-03 11:18:15 +00:00
Jamie Tanna b62fe59594 fix: remove references to "bot" (#39305)
We dropped the "bot" from our terminology long ago, but it looks like
we've got some outdated docs + code that reference it.

We should remove this to keep things consistent.

A `fix`, as we're changing the commit author's name, and log lines.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-02 08:56:20 +00:00
Thinh Nguyen ab105e6e42 feat(gomod): add gomodTidyAll option for indirect dependency updates in Go monorepos (#37138)
* feat(gomod): add `gomodTidyAll` option for indirect dependency updates in Go monorepos

In Go monorepos it is common for one module to depend on another in the
same repo via a local `replace` directive (e.g. `replace example.com/shared
=> ../shared`). When Renovate updates the shared module, today `go mod
tidy` runs only in that module, leaving dependent `go.sum` files stale.

Add a new `gomodTidyAll` post-update option that:

- Discovers every `go.mod` in the repo and parses its local `replace`
  directives (both inline and block form).
- Builds a dependency graph with `graph-data-structure`, with edges from
  dependency → dependent, matching the existing NuGet convention.
- Runs `go mod tidy` on every transitive dependent in topological order,
  propagating any `gomodTidy1.17` / `gomodTidyE` flags to the dependent
  commands.
- Collects updated `go.mod` and `go.sum` files from each dependent
  directory into the artifact result.
- Implies `gomodTidy` so users only need to enable one option.

Supporting changes:

- Extract `getMatchingFiles` and `resolveRelativePathToRoot` into
  `lib/util/fs/util.ts` so NuGet and gomod can share them instead of
  each having its own glob/resolve helper.
- Refactor `lib/modules/manager/nuget/package-tree.ts` to use the
  shared `getMatchingFiles` helper and rename local variables for
  clarity (`deps` → `visited`, `dep` → `dependent`) per review feedback.

Docs and config:

- Register `gomodTidyAll` in `postUpdateOptions` `allowedValues`.
- Add a row for `gomodTidyAll` to the `postUpdateOptions` table in
  `docs/usage/configuration-options.md`.
- Add a "Monorepo tidying for local `replace` directives" subsection
  to `docs/usage/golang.md` describing when to use the option.

Tests and coverage:

- `lib/modules/manager/gomod/package-tree.spec.ts` — parse/graph/topo
  order, 100% line/branch/function coverage.
- `lib/modules/manager/gomod/artifacts-gomodtidyall.spec.ts` — six
  integration cases covering subshell commands, `tidyOpts` propagation,
  result collection, no-op with no dependents, error handling, and
  the disabled path.
- Full `lib/modules/manager/gomod` suite (151 tests) and NuGet
  package-tree suite (9 tests) pass; new code is fully covered.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(gomod): use named capture groups and direct fs util imports

* fix(gomod): use `go -C` for dependent module tidy commands

A subshell only works in Docker mode, where all commands are concatenated
into a single `bash -l -c`. With `binarySource=install` or `global` each
command is split with shlex and run without a shell, so `(cd dir && ...)`
is treated as the name of a binary.

* refactor(gomod): simplify parsing of local `replace` directives

A single regex now covers both the single line form and the lines inside
a `replace (...)` block. The previous block pattern stopped at the first
`)`, so a block containing a comment with a bracket was skipped, and the
single line pattern did not allow a trailing comment.

Also keeps the NuGet package tree unchanged apart from the two helpers it
now shares.

* docs(gomod): warn against combining `gomodTidyAll` with `gomodMassage`

Massaging comments out the relative `replace` directives that
`gomodTidyAll` follows, so the two options work against each other.

* refactor(fs): use `matchRegexOrGlob` in `getMatchingFiles`

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-13 08:35:38 +00:00
Sebastian Poxhofer 9a27d7aa78 ci(prettier): add prettier plugin for admonitions (#43615)
* ci: add local mkdocs-admonitions plugin for prettier to allow admonition preservation

* docs: remove uses of `prettier-ignore` for admonitions

* test: rather use await expect

* chore: use named group exclusively
2026-05-27 09:39:52 +00:00
Jamie Tanna 4b0146ab7b docs: use 2-space indentation for Markdown (#43537)
As noted in #39090, MkDocs requires 4 spaces for indentation (in
particular, for nested lists) whereas our Prettier/markdownlint
configuration expects 2 spaces.

This means that when trying to use i.e. nested lists, we need to ignore
prettier and markdownlint, otherwise it fails.

To handle this, we can add a Markdown hook to override the indentation
level to 2 spaces.

This also requires we update:

- admonitions
- indented text in `index.md`

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-26 09:05:42 +00:00
Ed Harrod 894250d392 chore(manager/gomod): Update go version to 1.23.3 in tests/examples (#32514)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-11-13 15:45:18 +00:00
discworldian decdac9aab docs(golang): Minor grammar error in readme (#30938)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-08-26 09:07:39 +00:00
HonkingGoose b58322920c docs: use titles for more code blocks (#25526) 2023-11-02 16:04:33 +00:00
HonkingGoose 76c9c63417 docs: use simple words (#23989) 2023-08-22 14:07:21 +02:00
Sebastian Poxhofer 19259a0383 feat!: categories (#16534)
Closes #13953

Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

BREAKING CHANGE: languages are now called categories instead
2023-07-04 19:21:52 +02:00
HonkingGoose 71d082d16f docs: use relative URLs in more places (#22516) 2023-05-31 15:52:30 +00:00
Jorge Silva 91812d025d feat(manager/gomod): add goGetDirs option (#20156)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2023-04-18 04:55:28 +00:00
HonkingGoose 712fc31fc7 docs(go modules): vendored major upgrades not supported (#21025) 2023-03-18 14:40:13 +01:00
Alexander Birkner fbceff1397 feat(gomod): support -e option (#20199)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2023-02-07 14:00:16 +01:00
Rhys Arkins 4b0102f08b fix(gomod): default to not massaging replace statements (#15767) 2022-05-28 10:19:36 +02:00
Rhys Arkins e79813d32e feat: gomodNoMassage (#15462) 2022-05-05 11:33:50 +02:00
Hannes Norda f6e5e60d49 feat(manager/gomod): Add gomodTidy1.17 postUpdateOption (#13548)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2022-01-14 13:39:01 +00:00
Nejc Habjan 34f13fee3e test: enforce valid JSON in fenced markdown code blocks (#12196) 2021-11-11 11:11:55 +01:00
Tobias 87c5e8e022 feat(gomod): use git host rules as authentication for gosum updates (#12230)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-10-31 07:06:59 +00:00
Atsushi Watanabe 72d50cc5d6 fix(gomod): Do not tidy go.mod on major update without gomodUpdateImportPaths (#11976)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-10-20 11:28:09 +00:00
Ville Skyttä a3281644b0 docs: spelling and grammar fixes (#11367)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2021-08-22 08:51:42 +00:00
Rhys Arkins f0e1070299 fix(gomod): revert auth changes (#11021) 2021-07-30 10:23:35 +00:00
HonkingGoose 99a2eff8bb docs: improve Go binary version docs (#10942) 2021-07-27 10:25:54 +02:00
Tobias 9237127be2 chore(go): add support for authenticated go git from source (#10750) 2021-07-14 08:32:30 +00:00
Matt Palmer 49a3a8ab27 feat(gomod): Update source import paths on major upgrade (#9144) 2021-03-27 06:02:32 +00:00
Rhys Arkins c17e40993a docs: lint 2021-03-09 23:21:38 +01:00
HonkingGoose eb33a4d97a docs: improve Go documentation (#7820)
* use 1.'s for ordered list

* fix whitespace in ordered list

* use active voice

* capitalize SemVer

* Remove fluff word

* use active voice

* update paragraph, needs further work

* explain how to pin to a specific Go lang version

* change Go version from 1.14.2 -> 1.14.12

* strip patch level from Go version, explain why
2020-11-29 14:29:18 +01:00
HonkingGoose 8560b5d657 docs: remove punctuation from end of (un)ordered lists (#7669)
* fix bad indentation

* remove punctuation from end of (un)ordered lists
2020-11-06 12:00:57 +01:00
HonkingGoose 32dd490672 docs: use one sentence per line (#7625) 2020-11-02 09:52:37 +01:00
Rhys Arkins 8e97958dd1 docs: relocate website docs 2019-09-09 04:28:25 +02:00