analyzer

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. * * This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

Index

Constants

This section is empty.

Variables

View Source
var (
	OpenAPIRegex     = regexp.MustCompile(`("(openapi|swagger)"|(openapi|swagger))\s*:`)
	OpenAPIRegexInfo = regexp.MustCompile(`("info"|info)\s*:`)
	OpenAPIRegexPath = regexp.MustCompile(`("(paths|components|webhooks)"|(paths|components|webhooks))\s*:`)
)

move the openApi regex to public to be used on file.go openAPIRegex - Regex that finds OpenAPI defining property "openapi" or "swagger" openAPIRegexInfo - Regex that finds OpenAPI defining property "info" openAPIRegexPath - Regex that finds OpenAPI defining property "paths", "components", or "webhooks" (from 3.1.0) cloudRegex - Regex that finds CloudFormation defining property "Resources" k8sRegex - Regex that finds Kubernetes defining property "apiVersion" k8sRegexKind - Regex that finds Kubernetes defining property "kind" k8sRegexMetadata - Regex that finds Kubernetes defining property "metadata" k8sRegexSpec - Regex that finds Kubernetes defining property "spec"

Functions

func Analyze

func Analyze(ctx context.Context, a *Analyzer) (model.AnalyzedPaths, error)

nolint:gocyclo Analyze will go through the slice paths given and determine what type of queries should be loaded should be loaded based on the extension of the file and the content

Types

type Analyzer

type Analyzer struct {
	RepoPath          string
	Paths             []string
	Types             []string
	ExcludeTypes      []string
	Exc               []string
	Only              []string
	GitIgnoreFileName string
	ExcludeGitIgnore  bool
	MaxFileSize       int
	NumWorkers        int
}

Analyzer keeps all the relevant info for the function Analyze

type Parameters

type Parameters struct {
	Results     string
	Path        []string
	MaxFileSize int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL