Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Spell incantation for "github.com/golangci/golangci-lint" Go module #34

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

svengreb
Copy link
Owner

Resolves #33

The "github.com/golangci/golangci-lint" [1] Go module provides the
`golangci-lint` commands, a fast, parallel runner for dozens of Go
linters Go that uses caching, supports YAML configurations and has
integrations with all major IDEs.
The source code for the `golangci-lint` command can be found in the
"golangci/golangci-lint" [2] GitHub repository.

To configure and run the `golangci-lint` command, a new
`spell.Incantation` [3] has been implemented in the new
"golangcilint" [4] package that can be casted using the "gobin"
caster [5] or any other spell caster [6] that handles spell
incantations [3] of kind `KindGoModule` [7].

The spell incantation is customizable through the following functions:

- `WithArgs(args ...string) golangcilint.Option` - sets additional
  arguments to pass to the `golangci-lint` module command.
- `WithEnv(env map[string]string) golangcilint.Option` - sets the spell
  incantation specific environment.
- `WithModulePath(path string) golangcilint.Option` - sets the
  `golangci-lint` module command import path. Defaults to
    `golangcilint.DefaultGoModulePath`.
- `WithModuleVersion(version *semver.Version) golangcilint.Option` -
  sets the `golangci-lint` module version. Defaults to
    `golangcilint.DefaultGoModuleVersion`.
- `WithVerboseOutput(verbose bool) golangcilint.Option` - indicates
  whether the output should be verbose.

[1]: https://pkg.go.dev/github.com/golangci/golangci-lint
[2]: https://github.com/golangci/golangci-lint/tree/master/cmd/golangci-lint
[3]: https://pkg.go.dev/github.com/svengreb/wand/pkg/spell#Incantation
[4]: https://pkg.go.dev/github.com/svengreb/wand/pkg/spell/golangcilint
[5]: https://pkg.go.dev/github.com/svengreb/wand/pkg/cast/gobin#Caster
[6]: https://pkg.go.dev/github.com/svengreb/wand/pkg/cast#Caster
[7]: https://pkg.go.dev/github.com/svengreb/wand/pkg/spell#KindGoModule

GH-33
@svengreb svengreb added this to the 0.1.0 milestone Nov 24, 2020
@svengreb svengreb self-assigned this Nov 24, 2020
@svengreb svengreb merged commit 11c9f62 into main Nov 24, 2020
@svengreb svengreb deleted the feature/gh-33-spell-incantation-golangci-lint-module branch November 24, 2020 14:56
@svengreb svengreb removed their assignment Nov 24, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spell incantation for “github.com/golangci/golangci-lint“ Go module
1 participant