bazel

package
v0.0.0-...-96c19a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bazel implements the main logic of the analysis for Bazel-related files. It currently supports auto-approval of changes to BUILD.bazel files which involve comments, formatting, test-related directives, and removal (but not modification or addition) of dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// analyzableFileName represents file name of analyzable files (it
	// is made configurable for testing purposes, as test files have
	// different names than prod files).
	AnalyzableFileName string
	// contains filtered or unexported fields
}

Analyzer is an analyzer for Bazel files.

func (*Analyzer) BaseIRBuild

func (a *Analyzer) BaseIRBuild(filesToAnalyze []string, rootDir string) error

BaseIRBuild builds intermediate representation for relevant files in the base diff.

func (*Analyzer) ChangesEq

func (a *Analyzer) ChangesEq() (bool, error)

ChangesEq returns true if the changes between Bazel files in base and last diffs are equivalent.

func (*Analyzer) IsAnalyzable

func (a *Analyzer) IsAnalyzable(fileName string) bool

IsAnalyzable determines if a given file name represents file analyzable by this analyzer.

func (*Analyzer) LastIRBuild

func (a *Analyzer) LastIRBuild(filesToAnalyze []string, rootDir string) error

LastIRBuild builds intermediate representation for relevant files in the last diff.

Jump to

Keyboard shortcuts

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