fleetlint Policy for a fleet of repositories
v0.3
Getting started

CEL reference

Generated by fleetlint docs; do not edit. Everything an expr rule can use.

Variables

VariableContents
repoFacts: name, stacks, forge, visibility, public, container (none, devcontainer, docker, podman), tier, layout, ci, hooks, has_git, scope.
release{exists, mechanisms, tag_patterns, latest_tag}.
taskrunner{kind, targets, file, cmd, deps, recipes}: the task runner whatever its kind (make, just, task, npm-scripts, gradle, none). cmd is how a target is invoked (make, just, task, npm run, ./gradlew); deps and recipes map each target to what it depends on and the commands it runs.
paramsThe rule’s params map from the catalog or the repo override.
itemIn a rule with foreach, the current element; "" otherwise.

Functions

FunctionReturns
exists(glob: string) -> boolTrue if any file in the scope matches the glob (** supported).
file(path: string) -> boolTrue if the exact path exists (file or directory). (has is reserved by CEL.)
glob(pattern: string) -> list<string>Scope-relative paths matching the glob, sorted.
tracked() -> list<string>Git-tracked paths in the scope.
text(path: string) -> stringFile contents, or "" when absent.
lines(path: string) -> list<string>File contents split into lines.
yaml(path: string) -> dynParsed YAML document; null when absent.
toml(path: string) -> dynParsed TOML document; null when absent.
json(path: string) -> dynParsed JSON document; null when absent. Comments and trailing commas are accepted (JWCC), as in tsconfig.json.
makefile(path: string) -> map{targets: list<string>, deps: map<string, list<string>>, recipes: map<string, list<string>>}; null when absent.
scan(path: string, regex: string) -> list<int>1-based line numbers where the regex matches.
matchesAny(list: list<string>, regex: string) -> boolTrue if any element matches the regex.
workflows() -> list<string>Paths of CI workflow files (.github/workflows, .gitea/workflows).
tagged_workflows() -> list<string>Workflow paths triggered by tag pushes (on.push.tags), i.e. release pipelines.
steps(path: string) -> list<map>Every step of every job in a workflow, each as {job, name, uses, run, with} with ""/{} for absent fields.
jobs(path: string) -> list<map>Every job of a workflow as {name, timeout_minutes, permissions, runs_on, uses}; timeout_minutes is 0 when unset.
triggers(path: string) -> list<string>Event names a workflow reacts to (push, pull_request, pull_request_target, …), whatever the on: shape.
tags() -> list<string>Git tags, newest version first.
tag_signed(name: string) -> boolTrue if the tag is an annotated tag carrying a PGP, SSH or X.509 signature; false for lightweight or unsigned tags. The signature is not verified.
commits(n: int) -> list<map>Newest n commits as {hash, author, email, subject, body, trailers, lines}; lines is insertions plus deletions; empty without git.
grep(glob: string, regex: string) -> list<map>{path, line, text, match} for every line matching the regex (case-insensitive) in files matching the glob; match is the first capture group, or the whole match, unshortened; skips fenced code blocks; pairs with foreach to flag every match.
codegrep(kind: string, regex: string) -> list<map>{path, line, text, match} for every matching line of tracked source code; kind is code, test or nontest. Case-sensitive unless the pattern starts with (?i); vendored, generated and build paths are skipped.
filesize(path: string) -> intSize in bytes of a tracked or untracked file; 0 when absent.
globmatch(pattern: string, path: string) -> boolTrue if the path matches the glob (** supported).

Standard CEL operators, macros (all, exists, filter, map, has) and string functions (contains, startsWith, endsWith, matches, size) are available. A rule’s result must be a bool; with foreach, the list expression is evaluated first and expr once per item.


Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.