Open
Show file tree
Hide file tree
Changes from 1 commit
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Failed to load files.
PrevPrevious commit
Next Next commit
feat: update to v0.8.0 merge config
Update to v0.8.0 which adds merge config support. This improves
compatibility with golangci-lint by allowing the internal rules to be
applied and overridden with minimal configuration.
  • Loading branch information
@stevenh
stevenh committedDec 17, 2022
commit 5a26360429a551b3522e8c336b2e6d9b62bae8b7
Original file line numberDiff line numberDiff line change
Expand Up@@ -1747,45 +1747,22 @@ linters-settings:
begin: false

uncalled:
default-category: uncalled
# Disables all rules.
# Default: false
disabled-all: true
# Disables the given rules.
# Default: []
disabled:
- context-cancel
# Enables specific rules, in combination with disable all.
# Default: []
enabled:
- sql-rows-err
# Add or override default rules.
# Default: []
rules:
# Checks for missing sql Rows.Err() calls.
- name: sql-rows-err
# Default: false
disabled: true
category: sql
packages:
- database/sql
- .com/jmoiron/sqlx
methods: []
results:
- type: .Rows
pointer: true
expect:
call: .Err
args: []
- type: error
pointer: false
# Checks for missing http Reponse.Body.Close() calls.
- name: http-response-body-close
# Default: false
disabled: true
category: http
packages:
- net/http
methods: []
results:
- type: .Response
pointer: true
expect:
call: .Body.Close
args: []
- type: error
pointer: false
# Checks for missing context CancelFunc() calls.
# Check for missing context CancelFunc() calls.
- name: context-cancel
# Default: false
disabled: true
category: context
packages:
- context
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,7 +93,7 @@ require (
.com/spf13/viper v1.12.0
.com/ssgreg/nlreturn/v2 v2.2.1
.com/stbenjam/no-sprintf-host-port v0.1.1
.com/stevenh/go-uncalled v0.7.3
.com/stevenh/go-uncalled v0.8.0
.com/stretchr/testify v1.8.1
.com/tdakkota/asciicheck v0.1.1
.com/tetafro/godot v1.4.11
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -109,7 +109,12 @@ var defaultLintersSettings = LintersSettings{
SkipRegexp: `(export|internal)_test\.go`,
AllowPackages: []string{"main"},
},
Uncalled: uncalled.DefaultConfig(),
Uncalled: UncalledSettings{
DisableAll: false,
Enabled: nil,
Disabled: nil,
Rules: nil,
},
Unparam: UnparamSettings{
Algo: "cha",
},
Expand DownExpand Up@@ -604,8 +609,6 @@ type ReviveSettings struct {
}
}

type UncalledSettings = uncalled.Config

type RowsErrCheckSettings struct {
Packages []string
}
Expand DownExpand Up@@ -672,6 +675,8 @@ type UseStdlibVarsSettings struct {
SyslogPriority bool `mapstructure:"syslog-priority"`
}

type UncalledSettings = uncalled.Config

type UnparamSettings struct {
CheckExported bool `mapstructure:"check-exported"`
Algo string
Expand Down