Documentation ¶
Index ¶
- type LinterTest
- type LinterTestOptions
- func (opts *LinterTestOptions) DetectCQLinters() *LinterTestOptions
- func (opts *LinterTestOptions) DetectDepManagers() *LinterTestOptions
- func (opts *LinterTestOptions) DetectPythonFiles() *LinterTestOptions
- func (opts *LinterTestOptions) UseCQLinters(linters []api.CQLinter) *LinterTestOptions
- func (opts *LinterTestOptions) UseDepManagers(managers api.DependencyManagerList) *LinterTestOptions
- func (opts *LinterTestOptions) UsePythonFiles(files utils.Filenames) *LinterTestOptions
- func (opts *LinterTestOptions) WithConfig(conf *config.Config) *LinterTestOptions
- func (opts *LinterTestOptions) WithRunner(runner mllint.Runner) *LinterTestOptions
- type LinterTestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinterTest ¶
type LinterTestOptions ¶
type LinterTestOptions struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions() *LinterTestOptions
func (*LinterTestOptions) DetectCQLinters ¶
func (opts *LinterTestOptions) DetectCQLinters() *LinterTestOptions
func (*LinterTestOptions) DetectDepManagers ¶
func (opts *LinterTestOptions) DetectDepManagers() *LinterTestOptions
func (*LinterTestOptions) DetectPythonFiles ¶
func (opts *LinterTestOptions) DetectPythonFiles() *LinterTestOptions
func (*LinterTestOptions) UseCQLinters ¶
func (opts *LinterTestOptions) UseCQLinters(linters []api.CQLinter) *LinterTestOptions
func (*LinterTestOptions) UseDepManagers ¶
func (opts *LinterTestOptions) UseDepManagers(managers api.DependencyManagerList) *LinterTestOptions
func (*LinterTestOptions) UsePythonFiles ¶
func (opts *LinterTestOptions) UsePythonFiles(files utils.Filenames) *LinterTestOptions
func (*LinterTestOptions) WithConfig ¶
func (opts *LinterTestOptions) WithConfig(conf *config.Config) *LinterTestOptions
func (*LinterTestOptions) WithRunner ¶ added in v0.11.0
func (opts *LinterTestOptions) WithRunner(runner mllint.Runner) *LinterTestOptions
type LinterTestSuite ¶
type LinterTestSuite struct {
// contains filtered or unexported fields
}
func NewLinterTestSuite ¶
func NewLinterTestSuite(linter api.Linter, tests []LinterTest) *LinterTestSuite
NewLinterTestSuite initialises a test suite for a specific linter, with a list of tests that will be executed in parallel when suite.RunAll(t) is called.
func (*LinterTestSuite) DefaultOptions ¶
func (suite *LinterTestSuite) DefaultOptions() *LinterTestOptions
DefaultOptions returns a pointer to the options object that will be applied with every test (unless overridden by test options)
func (*LinterTestSuite) RunAll ¶
func (suite *LinterTestSuite) RunAll(t *testing.T)
RunAll runs all tests in the suite in parallel. For each test, it creates a project with the Dir and options specified in the LinterTest. Then, it runs the linter's LintProject with that project and calls the test's Expect function.
Click to show internal directories.
Click to hide internal directories.