Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ linters-settings:
- name: unexported-return
disabled: true
- name: unused-parameter
- name: unused-receiver

linters:
disable-all: true
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func newCacheCommand() *cacheCommand {
return c
}

func (c *cacheCommand) executeClean(_ *cobra.Command, _ []string) error {
func (*cacheCommand) executeClean(_ *cobra.Command, _ []string) error {
cacheDir := cache.DefaultDir()

if err := os.RemoveAll(cacheDir); err != nil {
Expand All @@ -60,7 +60,7 @@ func (c *cacheCommand) executeClean(_ *cobra.Command, _ []string) error {
return nil
}

func (c *cacheCommand) executeStatus(_ *cobra.Command, _ []string) {
func (*cacheCommand) executeStatus(_ *cobra.Command, _ []string) {
cacheDir := cache.DefaultDir()
_, _ = fmt.Fprintf(logutils.StdOut, "Dir: %s\n", cacheDir)

Expand Down
2 changes: 1 addition & 1 deletion pkg/goanalysis/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (lnt *Linter) allAnalyzerNames() []string {
return ret
}

func (lnt *Linter) configureAnalyzer(a *analysis.Analyzer, cfg map[string]any) error {
func (*Linter) configureAnalyzer(a *analysis.Analyzer, cfg map[string]any) error {
for k, v := range cfg {
f := a.Flags.Lookup(k)
if f == nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/goanalysis/metalinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func (ml MetaLinter) Run(_ context.Context, lintCtx *linter.Context) ([]result.I
return runAnalyzers(ml, lintCtx)
}

func (ml MetaLinter) Name() string {
func (MetaLinter) Name() string {
return "goanalysis_metalinter"
}

func (ml MetaLinter) Desc() string {
func (MetaLinter) Desc() string {
return ""
}

Expand All @@ -57,11 +57,11 @@ func (ml MetaLinter) getAnalyzers() []*analysis.Analyzer {
return allAnalyzers
}

func (ml MetaLinter) getName() string {
func (MetaLinter) getName() string {
return "metalinter"
}

func (ml MetaLinter) useOriginalPackages() bool {
func (MetaLinter) useOriginalPackages() bool {
return false // `unused` can't be run by this metalinter
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/lint/lintersdb/builder_linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewLinterBuilder() *LinterBuilder {

// Build loads all the "internal" linters.
// The configuration is use for the linter settings.
func (b LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
if cfg == nil {
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/lint/lintersdb/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (v Validator) validateLintersNames(cfg *config.Linters) error {
return nil
}

func (v Validator) validatePresets(cfg *config.Linters) error {
func (Validator) validatePresets(cfg *config.Linters) error {
presets := AllPresets()

for _, p := range cfg.Presets {
Expand Down
2 changes: 1 addition & 1 deletion pkg/lint/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (l *PackageLoader) loadPackages(ctx context.Context, loadMode packages.Load
return l.filterTestMainPackages(pkgs), nil
}

func (l *PackageLoader) parseLoadedPackagesErrors(pkgs []*packages.Package) error {
func (*PackageLoader) parseLoadedPackagesErrors(pkgs []*packages.Package) error {
for _, pkg := range pkgs {
var errs []packages.Error
for _, err := range pkg.Errors {
Expand Down
2 changes: 1 addition & 1 deletion pkg/result/processors/autogenerated_exclude.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (p *AutogeneratedExclude) Process(issues []result.Issue) ([]result.Issue, e
return filterIssuesErr(issues, p.shouldPassIssue)
}

func (p *AutogeneratedExclude) Finish() {}
func (*AutogeneratedExclude) Finish() {}

func (p *AutogeneratedExclude) shouldPassIssue(issue *result.Issue) (bool, error) {
if issue.FromLinter == "typecheck" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/result/processors/path_prettifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (PathPrettifier) Name() string {
return "path_prettifier"
}

func (p PathPrettifier) Process(issues []result.Issue) ([]result.Issue, error) {
func (PathPrettifier) Process(issues []result.Issue) ([]result.Issue, error) {
return transformIssues(issues, func(issue *result.Issue) *result.Issue {
if !filepath.IsAbs(issue.FilePath()) {
return issue
Expand Down