Providers
Considered itself defines almost no metrics. Providers collect metrics, and the policy engine evaluates their output.
Built in
filesystem.bytesmeasures file size.filesystem.longest_linemeasures the longest line in Unicode characters.
Bundled external provider
considered-scc wraps the vendored scc submodule and provides metrics such as scc.code_lines,scc.comment_lines, and scc.complexity.
Custom providers
For a metric namespaced foo.*, Considered runs an executable named considered-foo.
considered-foo --root <dir> --json --exclude-dir .git --exclude-dir node_modulesProviders must accept --root, --json, and repeated--exclude-dir arguments. Considered passes directory exclusions derived from the configuration, including .git, so providers can skip those directories before collecting metrics. The exact list depends on the repository's exclusions.
Print only the JSON result to stdout. Send diagnostics to stderr and exit non-zero on failure. Considered runs the providers referenced by configured standards; an unavailable or failed provider makes the check fail.
The provider prints JSON to stdout:
{
"metrics": [
{
"subject": "src/app/main.go",
"provider": "foo",
"values": { "foo.some_metric": 42 }
}
]
}subject is repository-relative. provider is optional and defaults to the metric namespace.