mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
backport of 8c18f24b9d (#21611) (#21614)
* combine into one checker * combine and simplify ci checks * add to test package list * remove testing test * only run deprecations check * only run deprecations check * remove unneeded repo check * fix bash options Co-authored-by: miagilepner <mia.epner@hashicorp.com>
This commit is contained in:
committed by
GitHub
parent
e3646c2ff7
commit
5ee5e2ce46
23
tools/codechecker/pkg/gonilnilfunctions/analyzer_test.go
Normal file
23
tools/codechecker/pkg/gonilnilfunctions/analyzer_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package gonilnilfunctions
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/tools/go/analysis/analysistest"
|
||||
)
|
||||
|
||||
// TestAnalyzer runs the analyzer on the test functions in testdata/funcs.go. The report from the analyzer is compared against
|
||||
// the comments in funcs.go beginning with "want." If there is no comment beginning with "want", then the analyzer is expected
|
||||
// not to report anything.
|
||||
func TestAnalyzer(t *testing.T) {
|
||||
f, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Fatal("failed to get working directory", err)
|
||||
}
|
||||
analysistest.Run(t, filepath.Join(f, "testdata"), Analyzer, ".")
|
||||
}
|
||||
Reference in New Issue
Block a user