aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/macabu
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-01-22 16:07:17 +0100
committerTaras Madan <tarasmadan@google.com>2025-01-23 10:42:36 +0000
commit7b4377ad9d8a7205416df8d6217ef2b010f89481 (patch)
treee6fec4fd12ff807a16d847923f501075bf71d16c /vendor/github.com/macabu
parent475a4c203afb8b7d3af51c4fd32bb170ff32a45e (diff)
vendor: delete
Diffstat (limited to 'vendor/github.com/macabu')
-rw-r--r--vendor/github.com/macabu/inamedparam/.gitignore22
-rw-r--r--vendor/github.com/macabu/inamedparam/.golangci.yml33
-rw-r--r--vendor/github.com/macabu/inamedparam/LICENSE-MIT21
-rw-r--r--vendor/github.com/macabu/inamedparam/README.md38
-rw-r--r--vendor/github.com/macabu/inamedparam/inamedparam.go94
5 files changed, 0 insertions, 208 deletions
diff --git a/vendor/github.com/macabu/inamedparam/.gitignore b/vendor/github.com/macabu/inamedparam/.gitignore
deleted file mode 100644
index f8d51e94c..000000000
--- a/vendor/github.com/macabu/inamedparam/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# If you prefer the allow list template instead of the deny list, see community template:
-# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
-#
-# Binaries for programs and plugins
-*.exe
-*.exe~
-*.dll
-*.so
-*.dylib
-inamedparam
-
-# Test binary, built with `go test -c`
-*.test
-
-# Output of the go coverage tool, specifically when used with LiteIDE
-*.out
-
-# Dependency directories (remove the comment below to include it)
-# vendor/
-
-# Go workspace file
-go.work
diff --git a/vendor/github.com/macabu/inamedparam/.golangci.yml b/vendor/github.com/macabu/inamedparam/.golangci.yml
deleted file mode 100644
index f0efa1cb6..000000000
--- a/vendor/github.com/macabu/inamedparam/.golangci.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-run:
- deadline: 30s
-
-linters:
- enable-all: true
- disable:
- - cyclop
- - deadcode
- - depguard
- - exhaustivestruct
- - exhaustruct
- - forcetypeassert
- - gochecknoglobals
- - gocognit
- - golint
- - ifshort
- - interfacer
- - maligned
- - nilnil
- - nosnakecase
- - paralleltest
- - scopelint
- - structcheck
- - varcheck
-
-linters-settings:
- gci:
- sections:
- - standard
- - default
- - prefix(github.com/macabu/inamedparam)
- section-separators:
- - newLine
diff --git a/vendor/github.com/macabu/inamedparam/LICENSE-MIT b/vendor/github.com/macabu/inamedparam/LICENSE-MIT
deleted file mode 100644
index b95f480ee..000000000
--- a/vendor/github.com/macabu/inamedparam/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2023 Matheus Macabu
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/macabu/inamedparam/README.md b/vendor/github.com/macabu/inamedparam/README.md
deleted file mode 100644
index 3336cb950..000000000
--- a/vendor/github.com/macabu/inamedparam/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# inamedparam
-
-A linter that reports interfaces with unnamed method parameters.
-
-## Flags/Config
-```sh
--skip-single-param
- skip interfaces with a single unnamed parameter
-```
-
-## Usage
-
-### Standalone
-You can run it standalone through `go vet`.
-
-You must install the binary to your `$GOBIN` folder like so:
-```sh
-$ go install github.com/macabu/inamedparam/cmd/inamedparam
-```
-
-And then navigate to your Go project's root folder, where can run `go vet` in the following way:
-```sh
-$ go vet -vettool=$(which inamedparam) ./...
-```
-
-### golangci-lint
-`inamedparam` was added as a linter to `golangci-lint` on version `v1.55.0`. It is disabled by default.
-
-To enable it, you can add it to your `.golangci.yml` file, as such:
-```yaml
-run:
- deadline: 30s
-
-linters:
- disable-all: true
- enable:
- - inamedparam
-```
diff --git a/vendor/github.com/macabu/inamedparam/inamedparam.go b/vendor/github.com/macabu/inamedparam/inamedparam.go
deleted file mode 100644
index 8ba7fe188..000000000
--- a/vendor/github.com/macabu/inamedparam/inamedparam.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package inamedparam
-
-import (
- "flag"
- "go/ast"
-
- "golang.org/x/tools/go/analysis"
- "golang.org/x/tools/go/analysis/passes/inspect"
- "golang.org/x/tools/go/ast/inspector"
-)
-
-const (
- analyzerName = "inamedparam"
-
- flagSkipSingleParam = "skip-single-param"
-)
-
-var Analyzer = &analysis.Analyzer{
- Name: analyzerName,
- Doc: "reports interfaces with unnamed method parameters",
- Run: run,
- Flags: flags(),
- Requires: []*analysis.Analyzer{
- inspect.Analyzer,
- },
-}
-
-func flags() flag.FlagSet {
- flags := flag.NewFlagSet(analyzerName, flag.ExitOnError)
-
- flags.Bool(flagSkipSingleParam, false, "skip interface methods with a single unnamed parameter")
-
- return *flags
-}
-
-func run(pass *analysis.Pass) (interface{}, error) {
- inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
-
- types := []ast.Node{
- &ast.InterfaceType{},
- }
-
- skipSingleParam := pass.Analyzer.Flags.Lookup(flagSkipSingleParam).Value.(flag.Getter).Get().(bool)
-
- inspect.Preorder(types, func(n ast.Node) {
- interfaceType, ok := n.(*ast.InterfaceType)
- if !ok || interfaceType == nil || interfaceType.Methods == nil {
- return
- }
-
- for _, method := range interfaceType.Methods.List {
- interfaceFunc, ok := method.Type.(*ast.FuncType)
- if !ok || interfaceFunc == nil || interfaceFunc.Params == nil {
- continue
- }
-
- // Improvement: add test case to reproduce this. Help wanted.
- if len(method.Names) == 0 {
- continue
- }
-
- methodName := method.Names[0].Name
-
- if skipSingleParam && len(interfaceFunc.Params.List) == 1 {
- continue
- }
-
- for _, param := range interfaceFunc.Params.List {
- if param.Names == nil {
- var builtParamType string
-
- switch paramType := param.Type.(type) {
- case *ast.SelectorExpr:
- if ident := paramType.X.(*ast.Ident); ident != nil {
- builtParamType += ident.Name + "."
- }
-
- builtParamType += paramType.Sel.Name
- case *ast.Ident:
- builtParamType = paramType.Name
- }
-
- if builtParamType != "" {
- pass.Reportf(param.Pos(), "interface method %v must have named param for type %v", methodName, builtParamType)
- } else {
- pass.Reportf(param.Pos(), "interface method %v must have all named params", methodName)
- }
- }
- }
- }
- })
-
- return nil, nil
-}