rulesstdtools

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder2017

type Finder2017 struct {
	// `ProjectsRoot` is the toplevel stdrepo project dir, with trailing
	// slash.  Candidate paths must be below.
	ProjectsRoot string

	IgnorePatterns []string
	// contains filtered or unexported fields
}

`Finder2017` implements the Stdrepo naming rules up to 2017, including timeless repos, but excluding the non-standard locations from `cfg_projectPathMap`. See `vissys_stdtools_2017` for details, in particular:

``` $ grep rePath.*= -- lib/_toolslib.sh rePath2013='^/<ProjectsRoot>/[^/]+/[0-9]{4}/[0-9]{4}(-[0-9]{2})?_[^/_]+$' rePath2014='^/<ProjectsRoot>/[^/]+/[0-9]{4}/([0-9]{2}_)?[^/_]+$' rePath2016='^/<ProjectsRoot>/[^/]+/[0-9]{4}/[^/_]+(_[0-9]{2})?$' rePathTimeless='^/<ProjectsRoot>/[^/]+/[a-zA-Z][a-zA-Z0-9-]*$'

$ grep -A 3 ^cfg_projectPathMap -- lib/_toolslib.sh ... ```

As a special case, `Finder2017` also returns the toplevel project directory itself. We always want a toplevel super-repo to ensure that all files are backed up somewhere, even if the repos at deeper levels do not fully cover the project. The init policy `bundle-subdirs` is usually used to track only subdir summaries and thus keep the number of paths that are tracked in the toplevel repo reasonable.

func NewFinder

func NewFinder(
	projectsRoot string,
	ignorePatterns []string,
) (*Finder2017, error)

func (*Finder2017) Find

func (f *Finder2017) Find(
	root string, known map[string]bool, fns rules.FindHandlerFuncs,
) error

Jump to

Keyboard shortcuts

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