aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ashanbrown
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-08-10 01:40:38 +0000
committerAleksandr Nogikh <nogikh@google.com>2023-08-10 08:15:09 +0000
commitc7f6fc5b21cf154fabe12125d2cd1b274c57cb53 (patch)
treece1c303a28a94d0096debb33d8bf853872ed1577 /vendor/github.com/ashanbrown
parent4df3089c378ffe870e094cb3088bcad17d16d02d (diff)
mod: do: bump github.com/golangci/golangci-lint from 1.53.3 to 1.54.0
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.53.3 to 1.54.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.53.3...v1.54.0) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/ashanbrown')
-rw-r--r--vendor/github.com/ashanbrown/forbidigo/forbidigo/forbidigo.go35
1 files changed, 34 insertions, 1 deletions
diff --git a/vendor/github.com/ashanbrown/forbidigo/forbidigo/forbidigo.go b/vendor/github.com/ashanbrown/forbidigo/forbidigo/forbidigo.go
index 943a69975..a7a3ab591 100644
--- a/vendor/github.com/ashanbrown/forbidigo/forbidigo/forbidigo.go
+++ b/vendor/github.com/ashanbrown/forbidigo/forbidigo/forbidigo.go
@@ -186,7 +186,40 @@ func (v *visitor) Visit(node ast.Node) ast.Visitor {
if isGodocExample && v.cfg.ExcludeGodocExamples {
return nil
}
- return v
+ ast.Walk(v, node.Type)
+ if node.Body != nil {
+ ast.Walk(v, node.Body)
+ }
+ return nil
+ // Ignore constant and type names
+ case *ast.ValueSpec:
+ // Look at only type and values for const and variable specs, and not names
+ if node.Type != nil {
+ ast.Walk(v, node.Type)
+ }
+ if node.Values != nil {
+ for _, x := range node.Values {
+ ast.Walk(v, x)
+ }
+ }
+ return nil
+ // Ignore import alias names
+ case *ast.ImportSpec:
+ return nil
+ // Ignore type names
+ case *ast.TypeSpec:
+ // Look at only type parameters for type spec
+ if node.TypeParams != nil {
+ ast.Walk(v, node.TypeParams)
+ }
+ ast.Walk(v, node.Type)
+ return nil
+ // Ignore field names
+ case *ast.Field:
+ if node.Type != nil {
+ ast.Walk(v, node.Type)
+ }
+ return nil
// The following two are handled below.
case *ast.SelectorExpr:
case *ast.Ident: