Skip to main content

Crate pelicode_detect

Crate pelicode_detect 

Source
Expand description

Detection of functions similar to the stored ones (specification §7).

Candidates are searched in stages: exact hashes from the weakest to the strongest normalization, then LSH buckets, then the fingerprint sets of the LSH candidates are compared.

Modules§

dependencies
Dependencies of the checked code, read from its lock files and manifests.

Structs§

Candidate
A stored function similar to a checked function.
Detector
Searches a database for functions similar to checked ones.
Options
Parameters of the search.
Report
Detection result of one checked function.

Enums§

Error
Errors of the database.
MatchKind
How a candidate matched.

Functions§

detect_all
Merges overlapping or adjacent line ranges. Checks the functions of files that select accepts against several databases at once, one detector each, and merges their candidates, best first. Each detector filters common code with the package counts of its own database. The size limits of the first detector’s options apply.

Type Aliases§

Result
Result of the detection, whose errors are those of the database.