classifytest

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package classifytest holds the classifier fixtures shared by unit and conformance tests.

Index

Constants

This section is empty.

Variables

View Source
var AllowedFromPrefixSibling = [][]string{{"../auth"}, {"../auth/"}, {"../auth/login.ts"}}

From src/lib/auth-utils: a sibling directory whose path is a string prefix of the cwd's path (src/lib/auth) is not an ancestor, so it is allowed; the real ancestors stay refused.

View Source
var AllowedFromRoot = joinRows(allowedFromRootRows, allowedMoreRows, infoFlagRows())

AllowedFromRoot: every row must pass with cwd = work-tree root.

View Source
var AllowedFromSubdir = [][]string{
	{"components"}, {"./components/"}, {"api", "components"}, {"../../e2e/targets"}, {"../../src/app/api"}, {"self/components"},
}
View Source
var EslintInfoFlags = []string{"--stdin", "--version", "-v", "--help", "-h", "--print-config", "--init", "--inspect-config",
	"--env-info", "--debug-info", "--mcp"}

EslintInfoFlags lint nothing (information and setup flags); eslint and tsc with them are allowed.

View Source
var EslintValueOptions = []string{"-c", "--config", "--max-warnings", "--fix-type", "--ignore-path", "--suppress-rule",
	"--format", "-f", "--stdin-filename", "--rule", "--parser", "--plugin", "--ext", "--cache-location", "--rulesdir", "-o",
	"--output-file", "--resolve-plugins-relative-to", "--parser-options", "--ignore-pattern", "--env", "--global",
	"--cache-strategy", "--report-unused-disable-directives-severity", "--suppressions-location", "--concurrency", "--flag"}

EslintValueOptions are the eslint options that take a value and are listed in skip_option_values: `npx eslint <opt> x` names no file, so it is a repo-wide lint, while a file after the value is scoped.

View Source
var PackageManagerSpellings = [][]string{
	{"npm", "test"}, {"npm", "t"}, {"npm", "tst"}, {"npm", "run", "test"},
	{"npm", "run", "-w", "pkg", "test"}, {"npm", "run", "--workspace", "pkg", "test"},
	{"npm", "run", "--prefix", "sub", "test"}, {"npm", "--loglevel", "silent", "run", "test"},
	{"npm", "--cache", "/tmp/c", "run", "test"}, {"npm", "--registry", "http://r", "test"},
	{"npm", "--userconfig", "u", "run", "test"}, {"npm", "--globalconfig", "g", "run", "test"},
	{"npm", "-w", "pkg", "test"}, {"pnpm", "run", "--filter", "pkg", "test"},
	{"pnpm", "run", "-F", "pkg", "test"}, {"pnpm", "--filter", "pkg", "test"}, {"yarn", "run", "--cwd", "pkg", "test"},
}
View Source
var RefusedFromPrefixSibling = [][]string{{".."}, {"../.."}, {"."}}
View Source
var RefusedFromRoot = joinRows(refusedFromRootRows, refusedMoreRows, eslintValueRows(), wrapperValueRows(), nodeValueRows())

RefusedFromRoot: every row must be refused with cwd = work-tree root.

View Source
var RefusedFromSubdir = [][]string{
	{"."}, {"./"}, {".."}, {"../.."}, {"../../src"}, {"../../e2e"}, {"../../scripts"}, {"self"}, {"/"},
	{"../app/."}, {"components", "."}, {"$PWD"},
}

From src/app of a work tree (with src/app/self -> .): eslint path arguments.

View Source
var ToolSpellings = [][]string{
	{"npm", "exec", "-w", "pkg", "eslint", "."}, {"npm", "exec", "--workspace", "pkg", "eslint", "."},
	{"npm", "exec", "--prefix", "sub", "eslint", "."}, {"npm", "--loglevel", "silent", "exec", "eslint", "."},
	{"pnpm", "--filter", "pkg", "exec", "tsc"}, {"npx", "-w", "pkg", "eslint", "."},
}

ToolSpellings are refused by NodeMonorepoRules from the work-tree root.

Functions

func FixtureTree

func FixtureTree(t testing.TB) string

FixtureTree builds the work tree the tables assume and returns its canonical root.

func NodeMonorepoRules

func NodeMonorepoRules() []config.RefuseRule

NodeMonorepoRules mirrors examples/node-monorepo/.bitc.toml [pools.lint] refuse.

func TestScriptRules

func TestScriptRules() []config.RefuseRule

TestScriptRules refuses the npm script "test"; PackageManagerSpellings are every spelling of running it that must be refused (audit D).

Types

This section is empty.

Jump to

Keyboard shortcuts

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