From 7b4377ad9d8a7205416df8d6217ef2b010f89481 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 22 Jan 2025 16:07:17 +0100 Subject: vendor: delete --- .../github.com/maratori/testableexamples/LICENSE | 21 ------------- .../pkg/testableexamples/testableexamples.go | 34 ---------------------- 2 files changed, 55 deletions(-) delete mode 100644 vendor/github.com/maratori/testableexamples/LICENSE delete mode 100644 vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go (limited to 'vendor/github.com/maratori/testableexamples') diff --git a/vendor/github.com/maratori/testableexamples/LICENSE b/vendor/github.com/maratori/testableexamples/LICENSE deleted file mode 100644 index e8b68be3e..000000000 --- a/vendor/github.com/maratori/testableexamples/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Marat Reymers - -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/maratori/testableexamples/pkg/testableexamples/testableexamples.go b/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go deleted file mode 100644 index 26d22c703..000000000 --- a/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go +++ /dev/null @@ -1,34 +0,0 @@ -package testableexamples - -import ( - "go/ast" - "go/doc" - "strings" - - "golang.org/x/tools/go/analysis" -) - -// NewAnalyzer returns Analyzer that checks if examples are testable. -func NewAnalyzer() *analysis.Analyzer { - return &analysis.Analyzer{ - Name: "testableexamples", - Doc: "linter checks if examples are testable (have an expected output)", - Run: func(pass *analysis.Pass) (interface{}, error) { - testFiles := make([]*ast.File, 0, len(pass.Files)) - for _, file := range pass.Files { - fileName := pass.Fset.File(file.Pos()).Name() - if strings.HasSuffix(fileName, "_test.go") { - testFiles = append(testFiles, file) - } - } - - for _, example := range doc.Examples(testFiles...) { - if example.Output == "" && !example.EmptyOutput { - pass.Reportf(example.Code.Pos(), "missing output for example, go test can't validate it") - } - } - - return nil, nil - }, - } -} -- cgit mrf-deployment