Skip to content

Commit 55ec7ef

Browse files
authored
remove unused variable (#30)
* remove unused variable * adjust lint settings * attempt to figure out which line is causing the linter error
1 parent a114a04 commit 55ec7ef

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/golangci-lint.yml

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
# Optional: working directory, useful for monorepos
1616
# working-directory: somedir
1717
output: checkstyle
18+
print-issued-lines: true
19+
format: colored-line-number
20+
print-linter-name: true
21+
sort-results: true
1822

1923
# Optional: golangci-lint command line arguments.
2024
# args: --issues-exit-code=0

.golangci.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ linters:
8686
- govet
8787
- exportloopref
8888
- errcheck
89+
- exhaustive
8990
enable-all: false
9091
disable:
9192
- maligned
@@ -159,7 +160,7 @@ linters-settings:
159160
# indicates that switch statements are to be considered exhaustive if a
160161
# 'default' case is present, even if all enum members aren't listed in the
161162
# switch
162-
default-signifies-exhaustive: false
163+
default-signifies-exhaustive: true
163164

164165
exhaustivestruct:
165166
# Struct Patterns is list of expressions to match struct packages and names

include.go

-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ func computeDependenciesAndInclusion(funcs []*provider, initF *provider) error {
159159
}
160160

161161
// Attempt to eliminate providers
162-
postCheck := make([]*provider, 0, len(funcs))
163162
for _, fm := range proposeEliminations(funcs) {
164163
if fm.d.excluded != nil {
165164
continue
@@ -172,8 +171,6 @@ func computeDependenciesAndInclusion(funcs []*provider, initF *provider) error {
172171
tryWithout(fm)
173172
}
174173

175-
eliminateUnused(postCheck)
176-
177174
debugln("final set of functions")
178175
for _, fm := range funcs {
179176
if fm.d.excluded == nil {

0 commit comments

Comments
 (0)