ProjectReport
Index
Constructors
constructor
Properties
adjacencyList
Stores a compacted form of the adjacency matrix. Each row index corresponds to the same report index. Each row entry corresponds to a report index. These relationships dictate the dependencies between all report ModuleReports given the source paths.
changeCost
Measures the average percentage of modules affected when one module / file in the project is changed. Lower is better.
coreSize
Measures the percentage of modules that are widely depended on which also depend on other modules. Lower is better.
errors
Stores any analysis errors.
firstOrderDensity
Measures the percentage of all possible internal dependencies that are actually realized in the project. Lower is better.
moduleAverage
Stores the average module metric data.
modules
Stores all ModuleReport data for the project sorted by the module / files srcPath
.
settings
Stores the settings used to generate the project report.
visibilityList
Stores a compacted form of the visibility matrix. Each row index corresponds to the same report index. Each row entry corresponds to a report index. These relationships dictate the reverse visibility between all report ModuleReports which may indirectly impact the given module / file.
Accessors
type
Returns the enum for the report type.
Returns default
Methods
clearErrors
Clears all errors stored in the project report and by default any module reports.
Parameters
clearChildren: boolean = true
(Optional) If false then class and module method errors are not cleared; default (true).
Returns void
finalize
Finalizes the ProjectReport. If
settings.serializeModules
is false output justfilePath
,srcPath
&srcPathAlias
entries of modules.Parameters
options: { serializeModules: boolean } = ...
(Optional) Allows overriding of ModuleReport serialization.
Returns default
getErrors
Gets all errors stored in the project report and by default any module reports.
Parameters
options: { includeChildren: boolean; includeReports: boolean; query?: any } = ...
Optional parameters.
Returns (default | { error: default; source: string })[]
getName
Returns the name / id associated with this report.
Returns any
getSetting
Returns the setting indexed by the given key.
Parameters
key: string
A key used to store the setting parameter.
defaultValue: any = undefined
A default value to return if no setting for the given key is currently stored.
Returns any
setSetting
Sets the setting indexed by the given key and returns true if successful.
Parameters
key: string
A key used to store the setting parameter.
value: any
A value to set to
this.settings[key]
.
Returns boolean
toFormat
Formats this ProjectReport given the type.
Parameters
name: string
The name of formatter to use.
optionaloptions: any
(Optional) One or more optional parameters to pass to the formatter.
Returns string
staticgetFormats
Returns the supported transform formats.
Returns string[]
staticparse
Deserializes a JSON object representing a ProjectReport.
Parameters
object: any
A JSON object of a ProjectReport that was previously serialized.
options: { skipFinalize: boolean } = ...
Optional parameters.
Returns default
Provides the default project report object which stores data pertaining to all modules / files contained.
All modules are stored in the
modules
member variable as ModuleReports.Various helper methods found in ModuleReport and AbstractReport help increment associated data during collection.