Query module Sanity

name
Violation of API contract
description
If the snapshot database or the QL library violates an API contract described in the documentation, queries that rely on the contract may yield unexpected results.
kind
table
problem.severity
error
id
js/sanity/api-contracts
tags
sanity

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

ast_sanity

Holds if a contract involving the AST structure is violated, where clsname is the QL class name of the entity violating the contract, problem describes the violation, and what gives location information where possible.

cfg_sanity

Holds if a contract involving the CFG structure is violated, where clsname is the QL class name of the entity violating the contract, problem describes the violation, and what gives location information.

exprWithoutEnclosingStmt

Holds if e is an expression that need not have an enclosing statement.

hasCFG

Holds if function or toplevel sc is expected to have an associated control flow graph.

jsdoc_sanity

Holds if a JSDoc type expression of QL class clsname does not have a unique toString, where problem describes the problem and what is the empty string.

location_sanity

Holds if a location entity of QL class clsname does not have a unique toString, where problem describes the problem and what gives location information where possible.

scope_sanity

Holds if a contract involving scoping and name lookup is violated, where clsname is the QL class name of the entity violating the contract, problem describes the violation, and what gives location information.

uniqueness_error

Holds if problem is a string describing the fact that method what, which is expected to have precisely one result, has number results, where number is either zero or a number between two and ten.

varref_sanity

Holds if a variable reference does not refer to a unique variable, where problem describes the problem and what is the name of the variable.