Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 832

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
From 44122c8987125fb0cfb872651392a3bae7f5878e Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Fri, 9 May 2025 23:46:26 +0700 Subject: [PATCH 1/6] Fix package name --- README.md | 2 +- identical/cmd/{duplicateiface => identicaliface}/main.go | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename identical/cmd/{duplicateiface => identicaliface}/main.go (100%) diff --git a/README.md b/README.md index 1872938..dfdb4a7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ go install github.com/uudashr/iface/cmd/ifacecheck@latest To install individual linter, use the following command: ```sh go install github.com/uudashr/iface/unused/cmd/unusediface@latest -go install github.com/uudashr/iface/duplicate/cmd/duplicateiface@latest +go install github.com/uudashr/iface/identical/cmd/identicaliface@latest go install github.com/uudashr/iface/opaque/cmd/opaqueiface@latest ``` diff --git a/identical/cmd/duplicateiface/main.go b/identical/cmd/identicaliface/main.go similarity index 100% rename from identical/cmd/duplicateiface/main.go rename to identical/cmd/identicaliface/main.go From 0de7004149c1930a1052fed2b1500b913bc21c60 Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Wed, 14 May 2025 12:58:22 +0700 Subject: [PATCH 2/6] Use nerd flag to avoid flag conflict --- identical/identical.go | 2 +- opaque/opaque.go | 2 +- unused/unused.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/identical/identical.go b/identical/identical.go index bd573cf..fd1816a 100644 --- a/identical/identical.go +++ b/identical/identical.go @@ -27,7 +27,7 @@ func newAnalyzer() *analysis.Analyzer { Run: r.run, } - analyzer.Flags.BoolVar(&r.debug, "debug", false, "enable debug mode") + analyzer.Flags.BoolVar(&r.debug, "nerd", false, "enable nerd mode") return analyzer } diff --git a/opaque/opaque.go b/opaque/opaque.go index 500249d..86c5db4 100644 --- a/opaque/opaque.go +++ b/opaque/opaque.go @@ -27,7 +27,7 @@ func newAnalyzer() *analysis.Analyzer { Run: r.run, } - analyzer.Flags.BoolVar(&r.debug, "debug", false, "enable debug mode") + analyzer.Flags.BoolVar(&r.debug, "nerd", false, "enable nerd mode") return analyzer } diff --git a/unused/unused.go b/unused/unused.go index 9c301ae..f5db366 100644 --- a/unused/unused.go +++ b/unused/unused.go @@ -28,7 +28,7 @@ func newAnalyzer() *analysis.Analyzer { Run: r.run, } - analyzer.Flags.BoolVar(&r.debug, "debug", false, "enable debug mode") + analyzer.Flags.BoolVar(&r.debug, "nerd", false, "enable nerd mode") analyzer.Flags.StringVar(&r.exclude, "exclude", "", "comma-separated list of packages to exclude from the check") return analyzer @@ -40,6 +40,7 @@ type runner struct { } func (r *runner) run(pass *analysis.Pass) (interface{}, error) { + fmt.Println("Running unused interface analyzer") excludes := strings.Split(r.exclude, ",") if slices.Contains(excludes, pass.Pkg.Path()) { return nil, nil From ebe7f0db6ee8c4b0feb7ea3fdd7a32e43f034a62 Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Wed, 14 May 2025 13:06:18 +0700 Subject: [PATCH 3/6] Resolve linter warning --- unused/unused.go | 1 + 1 file changed, 1 insertion(+) diff --git a/unused/unused.go b/unused/unused.go index f5db366..b6b3879 100644 --- a/unused/unused.go +++ b/unused/unused.go @@ -41,6 +41,7 @@ type runner struct { func (r *runner) run(pass *analysis.Pass) (interface{}, error) { fmt.Println("Running unused interface analyzer") + excludes := strings.Split(r.exclude, ",") if slices.Contains(excludes, pass.Pkg.Path()) { return nil, nil From 5e68c07a8c7074eb76b95b4f811e294b5045d0fe Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Wed, 14 May 2025 13:06:39 +0700 Subject: [PATCH 4/6] Upgrade to golanci-lint v2 --- .github/workflows/go.yml | 4 +-- .golangci.yml | 64 ++++++++++++++++++++++++---------------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d4f7d23..d32569c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -35,6 +35,6 @@ jobs: - uses: actions/setup-go@v5 with: go-version: oldstable - - uses: golangci/golangci-lint-action@v6 + - uses: golangci/golangci-lint-action@v8 with: - version: latest + version: v2.1 diff --git a/.golangci.yml b/.golangci.yml index 9f10bef..0781ea9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,11 +1,6 @@ +version: "2" linters: enable: - - errcheck - - gosimple - - govet - - ineffassign - - staticcheck - - unused - asasalint - asciicheck - bidichk @@ -24,7 +19,6 @@ linters: - errorlint - exhaustive - fatcontext - - gci - ginkgolinter - gocheckcompilerdirectives - gochecknoinits @@ -33,10 +27,7 @@ linters: - gocritic - godot - godox - - gofmt - - gofumpt - goheader - - goimports - gomoddirectives - gomodguard - goprintffuncname @@ -73,7 +64,6 @@ linters: - spancheck - tagalign - tagliatelle - - tenv - testableexamples - testifylint - testpackage @@ -85,18 +75,40 @@ linters: - whitespace - wsl - zerologlint - -linters-settings: - varnamelen: - ignore-type-assert-ok: true - ignore-decls: - - i int - - tx *sql.Tx - - ts *ast.TypeSpec - - fn *ast.FuncDecl - - fun *ast.FuncDecl - - fnDecl *ast.FuncDecl - - funDecl *ast.FuncDecl - mnd: - ignored-numbers: - - "2" \ No newline at end of file + settings: + mnd: + ignored-numbers: + - "2" + varnamelen: + ignore-type-assert-ok: true + ignore-decls: + - i int + - tx *sql.Tx + - ts *ast.TypeSpec + - fn *ast.FuncDecl + - fun *ast.FuncDecl + - fnDecl *ast.FuncDecl + - funDecl *ast.FuncDecl + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ From f65ab0508f47908dfc9f251daf2b1400009b233b Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Wed, 14 May 2025 13:14:38 +0700 Subject: [PATCH 5/6] Remove unwanted output --- unused/unused.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/unused/unused.go b/unused/unused.go index b6b3879..85eecc3 100644 --- a/unused/unused.go +++ b/unused/unused.go @@ -40,8 +40,6 @@ type runner struct { } func (r *runner) run(pass *analysis.Pass) (interface{}, error) { - fmt.Println("Running unused interface analyzer") - excludes := strings.Split(r.exclude, ",") if slices.Contains(excludes, pass.Pkg.Path()) { return nil, nil From 8a9d8dee04e4672ead774b427e92c62c7df34a7b Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Wed, 14 May 2025 13:15:48 +0700 Subject: [PATCH 6/6] Fix types load error by upgrade dep --- go.mod | 8 ++++---- go.sum | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index d0319a9..a99b263 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/uudashr/iface -go 1.22.1 +go 1.23.0 -require golang.org/x/tools v0.22.0 +require golang.org/x/tools v0.33.0 require ( - golang.org/x/mod v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/sync v0.14.0 // indirect ) diff --git a/go.sum b/go.sum index 16f2f69..3341c6a 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=