Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add inserts the file with the given `path` into the source archive, returning a non-nil error value if it fails
func AppendablePath ¶
AppendablePath transforms the given path and also replaces colons with underscores to make it possible to append it to a base path on Windows
func TransformPath ¶
TransformPath applies the transformations specified by `SEMMLE_PATH_TRANSFORMER` (if any) to the given path
Types ¶
type ProjectLayout ¶
type ProjectLayout struct {
// contains filtered or unexported fields
}
ProjectLayout describes a very simple project layout rewriting paths starting with `from` to start with `to` instead.
We currently only support project layouts of the form ¶
# to from//
func LoadProjectLayout ¶
func LoadProjectLayout(file *os.File) (*ProjectLayout, error)
LoadProjectLayout loads a project layout from the given file, returning an error if the file does not have the right format
func (*ProjectLayout) Transform ¶
func (p *ProjectLayout) Transform(path string) string
Transform transforms the given path according to the project layout: if it starts with the `from` prefix, that prefix is relaced by `to`; otherwise the path is returned unchanged.
Unlike the (internal) method `transformString`, this method handles Windows paths sensibly.