Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Spell incantation for “github.com/golangci/golangci-lint“ Go module #33

Closed
svengreb opened this issue Nov 24, 2020 · 0 comments · Fixed by #34
Closed

Spell incantation for “github.com/golangci/golangci-lint“ Go module #33

svengreb opened this issue Nov 24, 2020 · 0 comments · Fixed by #34

Comments

@svengreb
Copy link
Owner

The github.com/golangci/golangci-lint 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 repository.

To configure and run the golangci-lint command, a new spell.Incantation will be implemented in a new golangcilint package that can be casted using the gobin caster or any other spell caster that handles spell incantations of kind KindGoModule.

The spell incantation will be 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.
@svengreb svengreb added this to the 0.1.0 milestone Nov 24, 2020
@svengreb svengreb self-assigned this Nov 24, 2020
svengreb added a commit that referenced this issue Nov 24, 2020
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 added a commit that referenced this issue Nov 24, 2020
)

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

Closes GH-33
@svengreb svengreb removed their assignment Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant