module lang::php::analysis::composer::ComposerAnalysis
rascal-0.42.0
org.rascalmpl.php-analysis-0.3.3
Usage
import lang::php::analysis::composer::ComposerAnalysis;
Dependencies
import lang::php::analysis::composer::Composer;
import lang::php::util::Utils;
import lang::php::config::Config;
import lang::php::util::CLOC;
import lang::php::analysis::composer::VersionSyntax;
import IO;
import Set;
import ValueIO;
import String;
import List;
function extractComposerModel
Composer extractComposerModel(loc l)
Load the composer.json file from the system at location l.
Note that we assume this file exists.
function includesComposerFile
bool includesComposerFile(loc l)
Check to see if the system at location l includes a
composer.json file.
function composerCorpusRel
rel[str,str,loc] composerCorpusRel()
The composer corpus. Note that not all of these systems may
use composer -- that is part of what is being analyzed.
function composerFileCounts
tuple[int hasFile, int noFile] composerFileCounts()
Given a set of systems, return the count of how many
include a composer.json file and how many do not.
function loadComposerFilesForCorpus
map[loc, Composer] loadComposerFilesForCorpus()
function slocForCorpus
map[loc, ClocResult] slocForCorpus()
function saveSlocInfo
void saveSlocInfo(map[loc, ClocResult] results)
function loadSlocInfo
map[loc, ClocResult] loadSlocInfo()
function saveComposerInfo
void saveComposerInfo(map[loc, Composer] results)
function loadComposerInfo
map[loc, Composer] loadComposerInfo()
function linkComposerInfo
rel[str owner, str repo, Composer cinfo] linkComposerInfo(map[loc, Composer] summaries)
Join the owner/repo info from the corpus with the computed Composer summaries.
function linkClocInfo
rel[str owner, str repo, ClocResult sloc] linkClocInfo(map[loc, ClocResult] clocMap)
Join the owner/repo info from the corpus with the computed CLOC results.
function writeSlocCSV
void writeSlocCSV(loc l, rel[str owner, str repo, ClocResult sloc] slocInfo)
function writeDependenciesCSV
void writeDependenciesCSV(loc l, rel[str owner, str repo, Composer cinfo] composerInfo)
function dependenciesCount
void dependenciesCount(loc l, rel[str owner, str repo, Composer cinfo] composerInfo)
function dependencyCounts
void dependencyCounts(loc l, rel[str owner, str repo, Composer cinfo] composerInfo, str dependencyType)
function requireCounts
void requireCounts(loc l, rel[str owner, str repo, Composer cinfo] composerInfo)
function requireDevCounts
void requireDevCounts(loc l, rel[str owner, str repo, Composer cinfo] composerInfo)
data ConstraintCounts
data ConstraintCounts
= constraintCounts(int rawConstraint, int suggestion, int tildeConstraint, int caratConstraint, int wildcardConstraint, int logicalConstraint, int exactConstraint, int branchConstraint, int andConstraint, int orConstraint, int hyphenConstraint)
;
function emptyConstraintCounts
ConstraintCounts emptyConstraintCounts()
Summary counts of different kinds of possible Composer constraints.
function fetchConstraintCountsRel
lrel[str constraintType, PackageVersionConstraint constraint] fetchConstraintCountsRel(rel[str owner, str repo, Composer cinfo] composerInfo)
Extract a relation from constraint types to parsed constraints.
function computeConstraintCounts
ConstraintCounts computeConstraintCounts(
lrel[str constraintType, PackageVersionConstraint constraint] constraintList, set[str] constraintFilter = { }
)
Given a relation from constraint types to parsed constraints, compute counts for each type of constraint.
Note that this ignores the constraint type.