GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve go:lint by eunomie · Pull Request #12998 · dagger/dagger

Conversation

@eunomie

@eunomie eunomie commented Apr 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Improve our Go linter module:

  • dagger call go lint-module --module=...: previously the argument was mod, and --mod was conflicting with the -m/--mod of dagger CLI
    - dagger call go lint --limit=1: allow to set the parallelism limit for golangci-lint, very useful on personal machines to not use all the resources
    - dagger call go check-tidy --limit=1
    - dagger call go tidy --limit=1
  • dagger call go tidy-module --module=...

The limit argument is now set at the constructor level. It allows to define it once for all the different calls.
dagger call go --limit=1 lint, dagger call go --limit=1 check-tidy, dagger call go --limit=1 tidy.
But it also allows to easily put it in a .env file like:

GO_LIMIT=1

And then use the classical dagger check go:lint or dagger check go:check-tidy and it will use the user default value, that makes it very convenient to use.

And also removing the custom Changeset merge to rely on the one in the engine dag.Changest().WithChangesets(...)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tiborvass
tiborvass approved these changes Apr 17, 2026
View reviewed changes
@eunomie
eunomie force-pushed the fix-go-lint-module branch from f0c644d to 45ad9c2 Compare April 17, 2026 19:30
eunomie added 6 commits April 18, 2026 10:54
@eunomie
fix: go lint-module --module
fa92714
Previously the argument of `LintModule` was `mod`. But when trying to
set it, for instance:

    dagger call go lint-module --mod=my-dir

This conflicts with the `--mod` arg from `dagger` command with the
following error:

    ! flag already exists: mod

By renaming it to `module` it just works.

    dagger call go lint-module --module=my-dir

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
feat: allow to limit number of parallel go linters
2d05b48
golangci-lint can take a lot of local resources.
This adds a limit argument, default to 3 like the previous version, that
user can set to limit the parallelism.
On some machines to run with a limit of 1 can make it works where 3 is
using all the resources.
Of course this depends on the machine on which this is running.
Keeping the default to 3 and letting configure the limit should be
flexible enough.

This argument can be configured in the toolchain customization or on the
command line for a direct call:

    dagger call go lint --limit=1

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
feat: allow to limit the number of go mod tidy in parallel
74be755
Same as for `lint`, but on `tidy` this time.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
feat: allow to limit parallelism for go tidy
cd57bc1
And use builtin merge changeset feature

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
fix: go tidy-module --module
b7f83d6
Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
ref: extract the limit arg to be set at the constructor level
def5d1c
So we can easily define a .env with a single limit that will apply
to all of them

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie force-pushed the fix-go-lint-module branch from 45ad9c2 to def5d1c Compare April 18, 2026 08:54
@eunomie
eunomie requested a review from tiborvass April 18, 2026 09:01
@eunomie

eunomie commented Apr 18, 2026

Copy link
Copy Markdown
Member Author

@tiborvass I've changed the limit argument position, moved to the constructor.
The result is almost the same, but more generic, easy to configure with a .env and if I'm right more closer to the modules v2 where we will have only constructor related config.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eunomie
eunomie merged commit 1628026 into dagger:main Apr 21, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@eunomie
eunomie deleted the fix-go-lint-module branch April 21, 2026 07:26
tiborvass pushed a commit that referenced this pull request Apr 30, 2026
@eunomie @tiborvass
Improve go:lint (#12998)
30a4301
* fix: go lint-module --module

Previously the argument of `LintModule` was `mod`. But when trying to
set it, for instance:

    dagger call go lint-module --mod=my-dir

This conflicts with the `--mod` arg from `dagger` command with the
following error:

    ! flag already exists: mod

By renaming it to `module` it just works.

    dagger call go lint-module --module=my-dir

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit number of parallel go linters

golangci-lint can take a lot of local resources.
This adds a limit argument, default to 3 like the previous version, that
user can set to limit the parallelism.
On some machines to run with a limit of 1 can make it works where 3 is
using all the resources.
Of course this depends on the machine on which this is running.
Keeping the default to 3 and letting configure the limit should be
flexible enough.

This argument can be configured in the toolchain customization or on the
command line for a direct call:

    dagger call go lint --limit=1

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit the number of go mod tidy in parallel

Same as for `lint`, but on `tidy` this time.

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit parallelism for go tidy

And use builtin merge changeset feature

Signed-off-by: Yves Brissaud <[email protected]>

* fix: go tidy-module --module

Signed-off-by: Yves Brissaud <[email protected]>

* ref: extract the limit arg to be set at the constructor level

So we can easily define a .env with a single limit that will apply
to all of them

Signed-off-by: Yves Brissaud <[email protected]>

---------

Signed-off-by: Yves Brissaud <[email protected]>
(cherry picked from commit 1628026)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass pushed a commit that referenced this pull request Apr 30, 2026
@eunomie @tiborvass
Improve go:lint (#12998)
018f42d
* fix: go lint-module --module

Previously the argument of `LintModule` was `mod`. But when trying to
set it, for instance:

    dagger call go lint-module --mod=my-dir

This conflicts with the `--mod` arg from `dagger` command with the
following error:

    ! flag already exists: mod

By renaming it to `module` it just works.

    dagger call go lint-module --module=my-dir

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit number of parallel go linters

golangci-lint can take a lot of local resources.
This adds a limit argument, default to 3 like the previous version, that
user can set to limit the parallelism.
On some machines to run with a limit of 1 can make it works where 3 is
using all the resources.
Of course this depends on the machine on which this is running.
Keeping the default to 3 and letting configure the limit should be
flexible enough.

This argument can be configured in the toolchain customization or on the
command line for a direct call:

    dagger call go lint --limit=1

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit the number of go mod tidy in parallel

Same as for `lint`, but on `tidy` this time.

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit parallelism for go tidy

And use builtin merge changeset feature

Signed-off-by: Yves Brissaud <[email protected]>

* fix: go tidy-module --module

Signed-off-by: Yves Brissaud <[email protected]>

* ref: extract the limit arg to be set at the constructor level

So we can easily define a .env with a single limit that will apply
to all of them

Signed-off-by: Yves Brissaud <[email protected]>

---------

Signed-off-by: Yves Brissaud <[email protected]>
(cherry picked from commit 1628026)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass pushed a commit that referenced this pull request May 2, 2026
@eunomie @tiborvass
Improve go:lint (#12998)
e080e96
* fix: go lint-module --module

Previously the argument of `LintModule` was `mod`. But when trying to
set it, for instance:

    dagger call go lint-module --mod=my-dir

This conflicts with the `--mod` arg from `dagger` command with the
following error:

    ! flag already exists: mod

By renaming it to `module` it just works.

    dagger call go lint-module --module=my-dir

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit number of parallel go linters

golangci-lint can take a lot of local resources.
This adds a limit argument, default to 3 like the previous version, that
user can set to limit the parallelism.
On some machines to run with a limit of 1 can make it works where 3 is
using all the resources.
Of course this depends on the machine on which this is running.
Keeping the default to 3 and letting configure the limit should be
flexible enough.

This argument can be configured in the toolchain customization or on the
command line for a direct call:

    dagger call go lint --limit=1

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit the number of go mod tidy in parallel

Same as for `lint`, but on `tidy` this time.

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit parallelism for go tidy

And use builtin merge changeset feature

Signed-off-by: Yves Brissaud <[email protected]>

* fix: go tidy-module --module

Signed-off-by: Yves Brissaud <[email protected]>

* ref: extract the limit arg to be set at the constructor level

So we can easily define a .env with a single limit that will apply
to all of them

Signed-off-by: Yves Brissaud <[email protected]>

---------

Signed-off-by: Yves Brissaud <[email protected]>
(cherry picked from commit 1628026)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass pushed a commit that referenced this pull request May 4, 2026
@eunomie @tiborvass
Improve go:lint (#12998)
e2b25c0
* fix: go lint-module --module

Previously the argument of `LintModule` was `mod`. But when trying to
set it, for instance:

    dagger call go lint-module --mod=my-dir

This conflicts with the `--mod` arg from `dagger` command with the
following error:

    ! flag already exists: mod

By renaming it to `module` it just works.

    dagger call go lint-module --module=my-dir

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit number of parallel go linters

golangci-lint can take a lot of local resources.
This adds a limit argument, default to 3 like the previous version, that
user can set to limit the parallelism.
On some machines to run with a limit of 1 can make it works where 3 is
using all the resources.
Of course this depends on the machine on which this is running.
Keeping the default to 3 and letting configure the limit should be
flexible enough.

This argument can be configured in the toolchain customization or on the
command line for a direct call:

    dagger call go lint --limit=1

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit the number of go mod tidy in parallel

Same as for `lint`, but on `tidy` this time.

Signed-off-by: Yves Brissaud <[email protected]>

* feat: allow to limit parallelism for go tidy

And use builtin merge changeset feature

Signed-off-by: Yves Brissaud <[email protected]>

* fix: go tidy-module --module

Signed-off-by: Yves Brissaud <[email protected]>

* ref: extract the limit arg to be set at the constructor level

So we can easily define a .env with a single limit that will apply
to all of them

Signed-off-by: Yves Brissaud <[email protected]>

---------

Signed-off-by: Yves Brissaud <[email protected]>
(cherry picked from commit 1628026)
Signed-off-by: Tibor Vass <[email protected]>
@tiborvass tiborvass mentioned this pull request May 4, 2026
chore: prep for v0.20.7 #13069
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tiborvass tiborvass Awaiting requested review from tiborvass

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@eunomie @tiborvass
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.