CQM-GodFile¶
Lines of Code in a File (Empty, Comment, Code)
Required inputs: RFG
Any file containing more than 2000 gross lines of source code is a violation of this metric.
Motivation
Candidates for god files are, on the one hand, files that contain artifacts that have already been identified by other »god indicators«, e.g. GodRoutine, GodClass. In addition, files that are very large for other reasons, for example files with multiple (non-public) classes or file with multiple routines whose length is just short of the threshold for god routines, are also captured by GodFile. Such files often have to many artefacts (which however, are not recognised by other god rules), which therefore can only be changed, viewed and modified separately with excessive effort.
This rule is based on the CQM Quality Indicator: Gottdatei (p. 192-194).
Reference
Simon, Frank/ Seng, Olaf/ Mohaupt, Thomas (2006): Code-Quality-Management: Technische Qualität industrieller Softwaresysteme transparent und vergleichbar gemacht, 1st ed., Heidelberg, Germany: dpunkt.verlag GmbH.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing, provider, severity
This rule shares the following common metric options: base_view_name, excluded_node_types, hierarchy_edge_name, hierarchy_view_name, propagate, report_all_values, report_propagated_values
The following places define options that affect this rule: Analysis-GlobalOptions
alias_name¶
alias_name : str = 'Metric.GodFile'
display_name¶
display_name : str | None = 'Lines of Code in a File (Empty, Comment, Code)'
max_value¶
max_value : int | None = 2000
min_value¶
min_value : int | None = 0
rfg_metric_name¶
rfg_metric_name : str = 'Metric.Lines.File.LOC'