Annotations for checks that work on annotation files.
hunk ./doc/mascot.html 231
-Then, the module implementing the check can be registered through one of the MascotLibrary.Plugin. register_xyz_check function.
+Then, the module implementing the check can be registered through one of the MascotLibrary.Plugin. register_xyz_check function.
hunk ./doc/mascot.html 243
-
-code.builtin_types — redefinition of types
+
+code.builtin_types — redefinition builtin of types
hunk ./doc/mascot.html 254
-
-code.complex_condition — complex if/while conditions
+
+code.complex_condition — complex if/while/when conditions
hunk ./doc/mascot.html 257
-Checks for complex conditions of ’if’ and ’while’ constructs, that is conditions with too many boolean operators
+Checks for complex conditions of ’if’, ’while’, and ’when’ constructs, that is conditions with too many boolean operators
hunk ./doc/mascot.html 269
+
+code.deprecated — deprecated elements
+
+Detects deprecated elements.
+Rationale: One should not rely on the elements marked as deprecated in the official library.
+Limits: Does not check for deprecated elements outside of the official library.
+
+
+
+
+
+
+
+code.empty_for — empty ’for’ constructs
+
+Detects empty ’for’ constructs.
+Rationale: Either the loop is a waste of time, either some code is missing.
+
+
+
+
+
+
+
+code.empty_try — empty ’try’ constructs
+
+Detects empty ’try’ constructs.
+Rationale: As no exception could be thrown, the construct is useless.
+Limits: Asynchronous exception may occur.
+
+
+
+
+
+
+
+code.empty_while — empty ’while’ constructs
+
+Detects empty ’while’ constructs.
+Rationale: The only use of such a construct is to wait for an external condtion to become true. However, this is a wasting-CPU activity.
+
+
+
+
+
+
hunk ./doc/mascot.html 327
-
-code.identifier_length — identifier that are too short
+
+code.identifier_length — identifiers that are too short
hunk ./doc/mascot.html 332
-Limits: In some context, a given letter has a very precise meaning that make a longer identifier useless (if not clustering). Moreoever, in very short function it is not always necessary to use long names for parameters.
+Limits: In some context, a given letter has a very precise meaning that make a longer identifier useless (if not cluttering). Moreoever, in very short function it is not always necessary to use long names for parameters.
hunk ./doc/mascot.html 360
-Rationale: Repeated elements need to be upgraded at once when a modification is made, leading to possible desynchronization if modification is only made partially. Moreover, it is better to define symbolic constants rather than repeat the integer constant in various places.
+Rationale: Repeated elements need to be updated at once when a modification is made, leading to possible desynchronization if modification is only made partially. Moreover, it is better to define symbolic constants rather than to repeat the integer constant in various places.
hunk ./doc/mascot.html 371
-Detects ’if/then/else’ constructs will an associated condition whose top-level function application is a ’not’.
+Detects ’if/then/else’ constructs with an associated condition whose top-level function application is a ’not’.
hunk ./doc/mascot.html 453
-Limits: Disallowing open statement lead to longuer code becase every external reference has to be qualified.
+Limits: Disallowing open statement lead to longer code becase every external reference has to be qualified.
+Parameters:
+
-
+allowed_modules (symbol list defaulting to []): modules allowed in open statements
hunk ./doc/mascot.html 477
-
-code.predefined_exceptions — redefinition of exceptions
+
+code.physical_comparisons — detects physical comparisons
+
+This check detects the use of either ’==’ or ’!=’.
+Rationale: Novices coming from a C/C++/Java background often use them for a comparison that should be done through either ’=’ or ’<>’.
+Limits: If any of the comparison operators has been redefined, the check will yield false positives. Moreover, in some contexts, it is perfectly legitimate to use physical comparisons.
+
+
+
+
+
+
+
+code.predefined_exceptions — redefinition of predefined exceptions
hunk ./doc/mascot.html 500
-
-code.predefined_operators — redefinition of operators
+
+code.predefined_operators — redefinition predefined of operators
hunk ./doc/mascot.html 515
-Rationale: Repeated elements need to be upgraded at once when a modification is made, leading to possible desynchronization if modification is only made partially.
+Rationale: Repeated elements need to be updated at once when a modification is made, leading to possible desynchronization if modification is only made partially.
hunk ./doc/mascot.html 526
+
+code.textual_duplicate — textual duplicates
+
+Checks for the presence of duplicated text.
+Rationale: Duplicated text is often due to a copy/paste operation, and if possible should lead to code factorization.
+Limits: Being based on text, the check will not identify almost-identical code that differs only in terms of whitespaces or identifiers names.
+Parameters:
+
-
+offset (integer defaulting to 0): number of lines to ignore at file start
- trim_lines (boolean defaulting to false): whether to remove leading and trailing whitespaces
- window (integer defaulting to 10): minimum size of duplicates
+
+
+
+
+
+
+
+code.tuple_size — lengthy tuples
+
+Detects lengthy tuples.
+Rationale: When a tuple has to many members, it should be refactored into a record.
+Parameters:
+
-
+maximum (integer defaulting to 4): maximum number of members
+
+
+
+
+
+
hunk ./doc/mascot.html 567
+
+code.useless_external_parentheses — useless external parentheses
+
+Checks ’if’, ’when’, ’while’, and ’for’ constructs do not have superfluous external parentheses.
+Rationale: These constructs are themselves ’parenthesized’, and accept expression of a fixed type. As a consequence, parentheses hinder readability.
+
+
+
+
+
+
hunk ./doc/mascot.html 584
+Parameters:
+
-
+strict (boolean defaulting to false): whether empty comment should be rejected
hunk ./doc/mascot.html 599
+Parameters:
+
-
+strict (boolean defaulting to false): whether empty comment should be rejected
hunk ./doc/mascot.html 614
+Parameters:
+
-
+strict (boolean defaulting to false): whether empty comment should be rejected
hunk ./doc/mascot.html 631
-require_author (boolean defaulting to false): enforce presence of @author tag (toplevel only)