files

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllFilePaths

func GetAllFilePaths(fileOptions FileOptions) ([]string, error)

*

  • GetAllFilePaths - method used to get all file paths present in the user provided root path.

Types

type File

type File struct {
	Lines           []Line
	FileName        string
	IgnoresSelected []IgnoreSelected
}

func Read

func Read(filename string) (*File, error)

*

  • Read - method used to read the file content and store in file struct

func (*File) IsLineMarkedFalsePositive

func (f *File) IsLineMarkedFalsePositive(ruleID string, lineNumber int) bool

*

  • IsLineMarkedFalsePositive - method used to check an occurrence is false positive or not for
  • a particular RuleID in a line

type FileOptions

type FileOptions struct {
	RootPath        string
	DontGitIgnore   bool
	DontForceIgnore bool
}

type IgnoreSelected

type IgnoreSelected struct {
	BeginLine int
	EndLine   int
	RuleIDs   map[string]bool
}

type Line

type Line struct {
	LineNumber      int
	Text            string
	IsCommentedLine bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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