checker

package
v0.0.0-...-6f0ee80 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WARNING_SCRIPT = iota
	WARNING_REWRITER
	WARNING_XPATH
)
View Source
const TEST_FILE = "test/rewrite_test.yml"

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Warnings []*Warning
}

func CheckBeforeLinking

func CheckBeforeLinking(scripts []*tp.ScriptObject) *CheckResult

func CheckFile

func CheckFile(projectPath, scriptPath, fileName string, activeLayers []string) *CheckResult

func (*CheckResult) AddRewriterWarning

func (r *CheckResult) AddRewriterWarning(rrtype string, position int, message string)

func (*CheckResult) AddScriptWarning

func (r *CheckResult) AddScriptWarning(obj *tp.ScriptObject, ins *tp.Instruction, message string)

func (*CheckResult) AddXpathWarning

func (r *CheckResult) AddXpathWarning(obj *tp.ScriptObject, ins *tp.Instruction, message string)

func (*CheckResult) CheckForLocationExport

func (result *CheckResult) CheckForLocationExport(script *tp.ScriptObject)

func (*CheckResult) CheckForNotMisuse

func (result *CheckResult) CheckForNotMisuse(script *tp.ScriptObject)

func (*CheckResult) CheckForSelectText

func (result *CheckResult) CheckForSelectText(script *tp.ScriptObject)

func (*CheckResult) CheckXpath

func (result *CheckResult) CheckXpath(script *tp.ScriptObject)

type ProjectTests

type ProjectTests struct {
	Host          []RewriteTestCase
	Link          []RewriteTestCase
	Cookie_Domain []RewriteTestCase
}

type RewriteTestCase

type RewriteTestCase struct {
	Host     string
	Test     string
	Expected string
}

type Warning

type Warning struct {
	Type       int
	Message    string
	FilePath   string
	LineNumber string
}

func NewWarning

func NewWarning(warning_type int, filepath string, line_number int, message string) (w *Warning)

func (*Warning) File

func (w *Warning) File() string

func (*Warning) String

func (w *Warning) String() (result string)

Jump to

Keyboard shortcuts

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