category
code_metric
Core predicates for computing source code metrics.
logtalk_load(code_metrics(loader))
static
Public predicates
entity/1
Scans an entity and prints its metric score.
static
entity(Entity)
entity(+term)
- zero_or_one
file/2
Prints metric scores for all the entities defined in a loaded source file using the given options.
static
file(File,Options)
file(+atom,+list(compound))
- zero_or_one
file/1
Prints metric scores for all the entities defined in a loaded source file using default options.
static
file(File)
file(+atom)
- zero_or_one
directory/2
Scans a directory and prints metric scores for all entities defined in its loaded source files using the given options.
static
directory(Directory,Options)
directory(+atom,+list(compound))
- one
directory/1
Scans a directory and prints metric scores for all entities defined in its loaded source files using default options.
static
directory(Directory)
directory(+atom)
- one
rdirectory/2
Recursive version of the directory/1
predicate using the given options.
static
rdirectory(Directory,Options)
rdirectory(+atom,+list(compound))
- one
rdirectory/1
Recursive version of the directory/1
predicate using default options.
static
rdirectory(Directory)
rdirectory(+atom)
- one
library/2
Prints metrics scores for all loaded entities from a given library using the given options.
static
library(Library,Options)
library(+atom,+list(compound))
- one
library/1
Prints metrics scores for all loaded entities from a given library using default options.
static
library(Library)
library(+atom)
- one
rlibrary/2
Recursive version of the library/1
predicate using the given options.
static
rlibrary(Library,Options)
rlibrary(+atom,+list(compound))
- one
rlibrary/1
Recursive version of the library/1
predicate using default options.
static
rlibrary(Library)
rlibrary(+atom)
- one
all/1
Scans all loaded entities and prints their metric scores using the given options.
static
all(Options)
all(+list(compound))
- one
all/0
Scans all loaded entities and prints their metric scores using default options.
static
all
- one
entity_score/2
Score is a term that represents the metric score associated with a loaded entity. Fails if the metric does not apply.
static
entity_score(Entity,Score)
entity_score(@entity_identifier,-ground)
- zero_or_one
library_score/2
Score is a term that represents the metric score associated with a loaded library source files. Fails if the metric does not apply.
static
library_score(Library,Score)
library_score(@atom,-ground)
- zero_or_one
rlibrary_score/2
Score is a term that represents the metric score associated with loaded source files from a library and its sub-libraries. Fails if the metric does not apply.
static
rlibrary_score(Library,Score)
rlibrary_score(@atom,-ground)
- zero_or_one
file_score/2
Score is a term that represents the metric score associated with a loaded source file. Fails if the metric does not apply.
static
file_score(File,Score)
file_score(@atom,-ground)
- zero_or_one
directory_score/2
Score is a term that represents the metric score associated with loaded source files from a directory. Fails if the metric does not apply.
static
directory_score(Directory,Score)
directory_score(@atom,-ground)
- zero_or_one
rdirectory_score/2
Score is a term that represents the metric score associated with loaded source files from a directory and its sub-directories. Fails if the metric does not apply.
static
rdirectory_score(Directory,Score)
rdirectory_score(@atom,-ground)
- zero_or_one
all_score/1
Score is a term that represents the metric score associated with all loaded source files. Fails if the metric does not apply.
static
all_score(Score)
all_score(-ground)
- zero_or_one
format_entity_score//2
Formats the entity score for pretty printing.
static
format_entity_score(Entity,Score)
format_entity_score(@entity_identifier,+ground)
- one
Protected predicates
process_entity/2
Processes an entity of the given kind.
static
process_entity(Kind,Entity)
process_entity(+atom,@entity_identifier)
- one
process_file/2
Processes a source file using the given options.
static
process_file(Path,Options)
process_file(+atom,+list(compound))
- one
process_directory/2
Processes a directory of source files using the given options.
static
process_directory(Path,Options)
process_directory(+atom,+list(compound))
- one
process_rdirectory/2
Recursively process a directory of source files using the given options.
static
process_rdirectory(Path,Options)
process_rdirectory(+atom,+list(compound))
- one
process_library/2
Processes a library of source files using the given options.
static
process_library(Library,Options)
process_library(+atom,+list(compound))
- one
process_rlibrary/2
Recursively process a library of source files using the given options.
static
process_rlibrary(Library,Options)
process_rlibrary(+atom,+list(compound))
- one
process_all/1
Processes all loaded source code using the given options.
static
process_all(Options)
process_all(+list(compound))
- one
sub_directory/2
Enumerates, by backtracking, all directory sub-directories containing loaded files.
static
sub_directory(Directory,SubDirectory)
sub_directory(+atom,-atom)
- one
sub_library/2
Enumerates, by backtracking, all library sub-libraries.
static
sub_library(Library,SubLibrary)
sub_library(+atom,-atom)
- one
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)