abaplint rules documentation, 2.113.71
abaplint can be configured by placing a abaplint.json file in the root of the git repository. If no configuration file is found, the default configuration will be used, which contains have all rules enabled.Get default configuration by running abaplint -d > abaplint.json
abaplint-clean-code contains rule documentation as well as abaplint.json definitions which attempt to align abaplint with the official Clean ABAP styleguide.
171 Rules
2
11
1
20
12
53
4
23
3
52
123
add_test_attributes - Add test attributes for tests classes with test methods
Add test attributes DURATION and RISK LEVEL for tests classes with test methods
SingleFile
Add test attributes DURATION and RISK LEVEL for tests classes with test methods
align_parameters - Align Parameters
Checks for vertially aligned parameters
SingleFile,Whitespace,Styleguide,Quickfix
Checks for vertially aligned parameters
align_pseudo_comments - Align pseudo comments
Align code inspector pseudo comments in statements
SingleFile,Whitespace,Quickfix
Align code inspector pseudo comments in statements
align_type_expressions - Align TYPE expressions
Align TYPE expressions in statements
SingleFile,Whitespace,Quickfix
Align TYPE expressions in statements
allowed_object_naming - Allowed object naming
Enforces basic name length and namespace restrictions, see note SAP 104010
Naming,SingleFile
Enforces basic name length and namespace restrictions, see note SAP 104010
allowed_object_types - Check allowed object types
Restricts the set of allowed object types.
SingleFile
Restricts the set of allowed object types.
ambiguous_statement - Check for ambigious statements
Checks for ambiguity between deleting or modifying from internal and database table Add "TABLE" keyword or "@" for escaping SQL variables Only works if the target version is 740sp05 or above
SingleFile
Checks for ambiguity between deleting or modifying from internal and database table Add "TABLE" keyword or "@" for escaping SQL variables Only works if the target version is 740sp05 or above
avoid_use - Avoid use of certain statements
Detects usage of certain statements.
Styleguide,SingleFile
Detects usage of certain statements.
begin_end_names - Check BEGIN END names
Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END
Syntax,Quickfix,SingleFile
Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END
begin_single_include - BEGIN contains single INCLUDE
Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE
SingleFile
Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE
chain_mainly_declarations - Chain mainly declarations
Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.
SingleFile,Quickfix
Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.
change_if_to_case - Change IF to CASE
Finds IF constructs that can be changed to CASE
SingleFile,Styleguide
Finds IF constructs that can be changed to CASE
check_abstract - Check abstract methods and classes
Checks abstract methods and classes: - class defined as abstract and final, - non-abstract class contains abstract methods
SingleFile
Checks abstract methods and classes: - class defined as abstract and final, - non-abstract class contains abstract methods
check_ddic - Check DDIC
Checks the types of DDIC objects can be resolved, the namespace of the development/errors can be configured in "errorNamespace"
Syntax
Checks the types of DDIC objects can be resolved, the namespace of the development/errors can be configured in "errorNamespace"
check_transformation_exists - Check transformation exists
Checks that used XSLT transformations exist.
Syntax
Checks that used XSLT transformations exist.
class_attribute_names - Class attributes naming
Allows you to enforce a pattern, such as a prefix, for class variable names.
Naming,SingleFile
Allows you to enforce a pattern, such as a prefix, for class variable names.
classic_exceptions_overlap - Classic exceptions overlap when catching
Find overlapping classic exceptions
SingleFile
Find overlapping classic exceptions
cloud_types - Check cloud types
Checks that the package does not contain any object types unsupported in cloud ABAP.
SingleFile,Syntax
Checks that the package does not contain any object types unsupported in cloud ABAP.
colon_missing_space - Colon missing space
Checks for missing spaces after colons in chained statements.
Whitespace,Quickfix,SingleFile
Checks for missing spaces after colons in chained statements.
commented_code - Find commented code
Detects usage of commented out code.
Styleguide,Quickfix,SingleFile
Detects usage of commented out code.
constant_classes - Validate constant classes
Checks that a class contains exactly the constants corresponding to a domain's fixed values.
Styleguide
Checks that a class contains exactly the constants corresponding to a domain's fixed values.
constructor_visibility_public - Check constructor visibility is public
Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.
Styleguide,SingleFile
Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.
contains_tab - Code contains tab
Checks for usage of tabs (enable to enforce spaces)
Whitespace,Quickfix,Styleguide,SingleFile
Checks for usage of tabs (enable to enforce spaces)
cyclomatic_complexity - Cyclomatic Complexity
Cyclomatic complexity, only reported for methods
SingleFile
Cyclomatic complexity, only reported for methods
dangerous_statement - Dangerous statement
Detects potentially dangerous statements
SingleFile,Security
Detects potentially dangerous statements
db_operation_in_loop - Database operation in loop
Database operation in LOOP/DO/WHILE
SingleFile,Performance
Database operation in LOOP/DO/WHILE
definitions_top - Place definitions in top of routine
Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.
SingleFile,Quickfix
Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.
double_space - Double space
Checks that only a single space follows certain common statements.
Whitespace,Quickfix,SingleFile
Checks that only a single space follows certain common statements.
empty_event - Empty selection screen or list processing event block
Empty selection screen or list processing event block
SingleFile
Empty selection screen or list processing event block
empty_line_in_statement - Find empty lines in statements
Checks that statements do not contain empty lines.
Quickfix,Whitespace,SingleFile,Styleguide
Checks that statements do not contain empty lines.
empty_statement - Remove empty statement
Checks for empty statements (an empty statement is a single dot)
Quickfix,SingleFile
Checks for empty statements (an empty statement is a single dot)
empty_structure - Find empty blocks
Checks that the code does not contain empty blocks.
Styleguide,SingleFile
Checks that the code does not contain empty blocks.
exit_or_check - Find EXIT or CHECK outside loops
Detects usages of EXIT or CHECK statements outside of loops. Use RETURN to leave procesing blocks instead.
Styleguide,SingleFile,Quickfix
Detects usages of EXIT or CHECK statements outside of loops. Use RETURN to leave procesing blocks instead.
expand_macros - Expand Macros
Allows expanding macro calls with quick fixes
Styleguide,Quickfix,Upport
Allows expanding macro calls with quick fixes
exporting - EXPORTING can be omitted
Detects EXPORTING statements which can be omitted.
Styleguide,Quickfix,SingleFile
Detects EXPORTING statements which can be omitted.
forbidden_identifier - Forbidden Identifier
Forbid use of specified identifiers, list of regex.
SingleFile
Forbid use of specified identifiers, list of regex.
forbidden_pseudo_and_pragma - Forbidden pseudo comments and pragma
Checks for unwanted pseudo comments and pragma
Quickfix,SingleFile
Checks for unwanted pseudo comments and pragma
form_tables_obsolete - TABLES parameters are obsolete
Checks for TABLES parameters in forms.
SingleFile
Checks for TABLES parameters in forms.
fully_type_constants - Fully type constants
Checks constants for full typing - no implicit typing allowed.
SingleFile
Checks constants for full typing - no implicit typing allowed.
function_module_recommendations - Function Module Recommendations
Suggests replacements for various function modules
SingleFile
Suggests replacements for various function modules
functional_writing - Use functional writing
Detects usage of call method when functional style calls can be used.
Styleguide,Quickfix,SingleFile
Detects usage of call method when functional style calls can be used.
identical_conditions - Identical conditions
Find identical conditions in IF + CASE + WHILE etc Prerequsites: code is pretty printed with identical cAsE
SingleFile
Find identical conditions in IF + CASE + WHILE etc Prerequsites: code is pretty printed with identical cAsE
identical_contents - Identical contents
Find identical contents in blocks inside IFs, both in the beginning and in the end.
SingleFile
Find identical contents in blocks inside IFs, both in the beginning and in the end.
identical_descriptions - Identical descriptions
Searches for objects with the same type and same description
Searches for objects with the same type and same description
implement_methods - Implement methods
Checks for abstract methods and methods from interfaces which need implementing.
Syntax,Quickfix
Checks for abstract methods and methods from interfaces which need implementing.
implicit_start_of_selection - Implicit START-OF-SELECTION
Add explicit selection screen event handling
SingleFile
Add explicit selection screen event handling
in_statement_indentation - In-statement indentation
Checks alignment within statements which span multiple lines.
Whitespace,Quickfix,SingleFile
Checks alignment within statements which span multiple lines.
inline_data_old_versions - Inline data, old versions
Checks for inline data declarations in older releases. Only active for versions less than v740sp02
Syntax,SingleFile
Checks for inline data declarations in older releases. Only active for versions less than v740sp02
invalid_table_index - Invalid Table Index
Issues error for constant table index zero, as ABAP starts from 1
SingleFile,Quickfix
Issues error for constant table index zero, as ABAP starts from 1
keep_single_parameter_on_one_line - Keep single parameters on one line
Keep single parameter calls on one line
Whitespace,Styleguide,SingleFile
Keep single parameter calls on one line
keyword_case - Keyword case
Checks that keywords have the same case. Non-keywords must be lower case.
Styleguide,SingleFile,Quickfix
Checks that keywords have the same case. Non-keywords must be lower case.
line_break_multiple_parameters - Line break multiple parameters
Line break multiple parameters
Whitespace,Styleguide,Quickfix,SingleFile
Line break multiple parameters
line_break_style - Makes sure line breaks are consistent in the ABAP code
Enforces LF as newlines in ABAP files abapGit does not work with CRLF
Whitespace,SingleFile
Enforces LF as newlines in ABAP files abapGit does not work with CRLF
line_only_punc - Line containing only punctuation
Detects lines containing only punctuation.
Styleguide,Quickfix,SingleFile
Detects lines containing only punctuation.
local_class_naming - Local class naming conventions
Allows you to enforce a pattern, such as a prefix, for local class names.
Naming,SingleFile
Allows you to enforce a pattern, such as a prefix, for local class names.
local_testclass_consistency - Local testclass consistency
Checks that local test classes are placed in the test include, and class unit test flag is set
Syntax
Checks that local test classes are placed in the test include, and class unit test flag is set
local_variable_names - Local variable naming conventions
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols. Regexes are case-insensitive.
Naming,SingleFile
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols. Regexes are case-insensitive.
macro_naming - Macro naming conventions
Allows you to enforce a pattern for macro definitions
Naming,SingleFile
Allows you to enforce a pattern for macro definitions
many_parentheses - Too many parentheses
Searches for expressions where extra parentheses can safely be removed
SingleFile,Quickfix
Searches for expressions where extra parentheses can safely be removed
max_one_method_parameter_per_line - Max one method parameter definition per line
Keep max one method parameter description per line
SingleFile,Whitespace
Keep max one method parameter description per line
max_one_statement - Max one statement per line
Checks that each line contains only a single statement.
Styleguide,Quickfix,SingleFile
Checks that each line contains only a single statement.
message_exists - Check MESSAGE exists
In message statements, check that the message class + id exist
Syntax
In message statements, check that the message class + id exist
method_implemented_twice - Method implemented twice
Reports an error if a method is implemented or defined twice
SingleFile,Syntax
Reports an error if a method is implemented or defined twice
method_overwrites_builtin - Method name overwrites builtin function
Checks Method names that overwrite builtin SAP functions
Naming,SingleFile,Styleguide
Checks Method names that overwrite builtin SAP functions
method_parameter_names - Method parameter naming conventions
Allows you to enforce a pattern, such as a prefix, for method parameter names
Naming,SingleFile
Allows you to enforce a pattern, such as a prefix, for method parameter names
mix_returning - Mix of returning and exporting
Checks that methods don't have a mixture of returning and exporting/changing parameters
Styleguide,SingleFile
Checks that methods don't have a mixture of returning and exporting/changing parameters
names_no_dash - No dashes in FORM and DATA names
Checks for a "-" in FORM, DATA, PARAMETER and SELECT-OPTION names
SingleFile,Naming
Checks for a "-" in FORM, DATA, PARAMETER and SELECT-OPTION names
nesting - Check nesting depth
Checks for methods exceeding a maximum nesting depth
Styleguide,SingleFile
Checks for methods exceeding a maximum nesting depth
newline_between_methods - New line between methods
Checks for newlines between method implementations.
Whitespace,SingleFile
Checks for newlines between method implementations.
no_chained_assignment - No chained assignment
Find chained assingments and reports issues
SingleFile,Styleguide
Find chained assingments and reports issues
no_inline_in_optional_branches - Don't declare inline in optional branches
Don't declare inline in optional branches
Styleguide,SingleFile
Don't declare inline in optional branches
no_public_attributes - No public attributes
Checks that classes and interfaces don't contain any public attributes. Exceptions are excluded from this rule.
Styleguide,SingleFile
Checks that classes and interfaces don't contain any public attributes. Exceptions are excluded from this rule.
object_naming - Object naming conventions
Allows you to enforce a pattern, such as a prefix, for object names
Naming
Allows you to enforce a pattern, such as a prefix, for object names
obsolete_statement - Obsolete statements
Checks for usages of certain obsolete statements
SingleFile,Styleguide,Quickfix
Checks for usages of certain obsolete statements
omit_parameter_name - Omit parameter name
Omit the parameter name in single parameter calls
Styleguide,Quickfix
Omit the parameter name in single parameter calls
omit_preceding_zeros - Omit preceding zeros
Omit preceding zeros from integer constants
SingleFile,Quickfix
Omit preceding zeros from integer constants
parser_702_chaining - Parser Error, bad chanining on 702
ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords, this rule finds these and reports errors. Only active on target version 702 and below.
Syntax,SingleFile
ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords, this rule finds these and reports errors. Only active on target version 702 and below.
parser_error - Parser error
Checks for syntax not recognized by abaplint. See recognized syntax at https://syntax.abaplint.org
Syntax,SingleFile
Checks for syntax not recognized by abaplint. See recognized syntax at https://syntax.abaplint.org
parser_missing_space - Parser Error, missing space
In special cases the ABAP language allows for not having spaces before or after string literals. This rule makes sure the spaces are consistently required across the language.
Syntax,Whitespace,SingleFile
In special cases the ABAP language allows for not having spaces before or after string literals. This rule makes sure the spaces are consistently required across the language.
prefer_corresponding - Prefer corresponding( ) to MOVE-CORRESPONDING
Prefer corresponding( ) to MOVE-CORRESPONDING, from v740sp05 and up
SingleFile,Upport,Styleguide
Prefer corresponding( ) to MOVE-CORRESPONDING, from v740sp05 and up
prefer_inline - Prefer Inline Declarations
Prefer inline to up-front declarations.
Styleguide,Upport,Experimental,Quickfix
Prefer inline to up-front declarations.
prefer_pragmas - prefer pragmas over pseudo comments
prefer pragmas over pseudo comments
SingleFile,Styleguide
prefer pragmas over pseudo comments
prefer_raise_exception_new - Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE
Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE
Styleguide,SingleFile,Quickfix,Upport
Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE
prefer_returning_to_exporting - Prefer RETURNING to EXPORTING
Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.
Styleguide,SingleFile
Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.
prefer_xsdbool - Prefer xsdbool over boolc
Prefer xsdbool over boolc
Styleguide,Upport,Quickfix,SingleFile
Prefer xsdbool over boolc
preferred_compare_operator - Preferred compare operator
Configure undesired operator variants
SingleFile,Quickfix
Configure undesired operator variants
prefix_is_current_class - Prefix is current class
Reports errors if the current class or interface references itself with "current_class=>"
Styleguide,Quickfix,SingleFile
Reports errors if the current class or interface references itself with "current_class=>"
reduce_procedural_code - Reduce procedural code
Checks FORM and FUNCTION-MODULE have few statements
SingleFile,Styleguide
Checks FORM and FUNCTION-MODULE have few statements
remove_descriptions - Remove descriptions
Ensures you have no descriptions in metadata of methods, parameters, etc. Class descriptions are required, see rule description_empty. Consider using ABAP Doc for documentation.
Ensures you have no descriptions in metadata of methods, parameters, etc. Class descriptions are required, see rule description_empty. Consider using ABAP Doc for documentation.
rfc_error_handling - RFC error handling
Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls
SingleFile
Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls
select_performance - SELECT performance
Various checks regarding SELECT performance.
SingleFile,Performance
Various checks regarding SELECT performance.
select_single_full_key - Detect SELECT SINGLE which are possibily not unique
Detect SELECT SINGLE which are possibily not unique
Quickfix
Detect SELECT SINGLE which are possibily not unique
selection_screen_naming - Selection screen naming conventions
Allows you to enforce a pattern, such as a prefix, for selection-screen variable names.
Naming,SingleFile
Allows you to enforce a pattern, such as a prefix, for selection-screen variable names.
sequential_blank - Sequential blank lines
Checks that code does not contain more than the configured number of blank lines in a row.
Whitespace,Quickfix,SingleFile
Checks that code does not contain more than the configured number of blank lines in a row.
short_case - Short CASE
Checks for CASE statements which have fewer than the specified number of branches
SingleFile
Checks for CASE statements which have fewer than the specified number of branches
slow_parameter_passing - Slow Parameter Passing
Detects slow pass by value passing for methods where parameter is not changed
Performance
Detects slow pass by value passing for methods where parameter is not changed
space_before_colon - Space before colon
Checks that there are no spaces in front of colons in chained statements.
Whitespace,SingleFile,Quickfix
Checks that there are no spaces in front of colons in chained statements.
space_before_dot - Space before dot
Checks for extra spaces before dots at the ends of statements
Whitespace,Quickfix,Styleguide,SingleFile
Checks for extra spaces before dots at the ends of statements
sql_escape_host_variables - Escape SQL host variables
Escape SQL host variables, from 740sp05
Upport,Styleguide,Quickfix,Syntax
Escape SQL host variables, from 740sp05
start_at_tab - Start at tab
Checks that statements start at tabstops.
Whitespace,Styleguide,SingleFile
Checks that statements start at tabstops.
static_call_via_instance - Static call via instance variable
Static method call via instance variable
Styleguide
Static method call via instance variable
superclass_final - Super class final
Checks that classes which are inherited from are not declared as FINAL.
Syntax
Checks that classes which are inherited from are not declared as FINAL.
tabl_enhancement_category - TABL enhancement category must be set
Checks that tables do not have the enhancement category 'not classified'.
Checks that tables do not have the enhancement category 'not classified'.
tables_declared_locally - Check for locally declared TABLES
TABLES are always global, so declare them globally
SingleFile
TABLES are always global, so declare them globally
try_without_catch - TRY without CATCH
Checks for TRY blocks without a CATCH and CLEANUP block
SingleFile
Checks for TRY blocks without a CATCH and CLEANUP block
types_naming - TYPES naming conventions
Allows you to enforce a pattern for TYPES definitions
Naming,SingleFile
Allows you to enforce a pattern for TYPES definitions
unnecessary_chaining - Unnecessary Chaining
Find unnecessary chaining, all statements are checked
SingleFile,Quickfix
Find unnecessary chaining, all statements are checked
use_bool_expression - Use boolean expression
Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up
Upport,Styleguide,Quickfix,SingleFile
Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up
use_class_based_exceptions - Use class based exceptions
Use class based exceptions, checks interface and class definitions
Styleguide,SingleFile
Use class based exceptions, checks interface and class definitions
use_new - Use NEW
Checks for deprecated CREATE OBJECT statements.
Upport,Styleguide,Quickfix,SingleFile
Checks for deprecated CREATE OBJECT statements.
when_others_last - WHEN OTHERS last
Checks that WHEN OTHERS is placed the last within a CASE statement.
SingleFile
Checks that WHEN OTHERS is placed the last within a CASE statement.
whitespace_end - Whitespace at end of line
Checks for redundant whitespace at the end of each line.
Whitespace,Quickfix,SingleFile
Checks for redundant whitespace at the end of each line.
xml_consistency - XML consistency
Checks the consistency of main XML files, eg. naming for CLAS and INTF objects
Naming,Syntax
Checks the consistency of main XML files, eg. naming for CLAS and INTF objects