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
experimental
   
11
upport
   
1
downport
   
20
whitespace
   
12
naming
   
53
quick fix
   

4
performance
   
23
syntax
   
3
security
   
52
styleguide
   
123
single file
   

7bit_ascii - Check for 7bit ascii  single file   example
Only allow characters from the 7bit ASCII set.

abapdoc - Check abapdoc styleguide  single file
Various checks regarding abapdoc.

add_test_attributes - Add test attributes for tests classes with test methods  single file   example
Add test attributes DURATION and RISK LEVEL for tests classes with test methods

align_parameters - Align Parameters quick fix whitespace styleguide  single file   example
Checks for vertially aligned parameters

align_pseudo_comments - Align pseudo comments quick fix whitespace  single file   example
Align code inspector pseudo comments in statements

align_type_expressions - Align TYPE expressions quick fix whitespace  single file   example
Align TYPE expressions in statements

allowed_object_naming - Allowed object naming naming  single file
Enforces basic name length and namespace restrictions, see note SAP 104010

allowed_object_types - Check allowed object types  single file
Restricts the set of allowed object types.

ambiguous_statement - Check for ambigious statements  single file   example
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 styleguide  single file
Detects usage of certain statements.

begin_end_names - Check BEGIN END names quick fix  syntax   single file   example
Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END

begin_single_include - BEGIN contains single INCLUDE  single file   example
Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE

call_transaction_authority_check - Call Transaction Authority-Check styleguide  security   single file   example
Checks that usages of CALL TRANSACTION contain an authority-check.

cds_comment_style - CDS Comment Style  single file   example
Check for obsolete comment style

cds_legacy_view - CDS Legacy View upport  single file
Identify CDS Legacy Views

cds_parser_error - CDS Parser Error  syntax
CDS parsing

chain_mainly_declarations - Chain mainly declarations quick fix  single file   example
Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.

change_if_to_case - Change IF to CASE styleguide  single file   example
Finds IF constructs that can be changed to CASE

check_abstract - Check abstract methods and classes  single file
Checks abstract methods and classes: - class defined as abstract and final, - non-abstract class contains abstract methods

check_comments - Check Comments styleguide  single file   example
Various checks for comment usage.

check_ddic - Check DDIC  syntax
Checks the types of DDIC objects can be resolved, the namespace of the development/errors can be configured in "errorNamespace"

check_include - Check INCLUDEs  syntax
Checks INCLUDE statements

check_subrc - Check sy-subrc quick fix  single file
Check sy-subrc

check_syntax - Check syntax  syntax
Enables syntax check and variable resolution

check_text_elements - Check text elements
Check text elements exists or matches code

check_transformation_exists - Check transformation exists  syntax
Checks that used XSLT transformations exist.

class_attribute_names - Class attributes naming naming  single file
Allows you to enforce a pattern, such as a prefix, for class variable names.

classic_exceptions_overlap - Classic exceptions overlap when catching  single file   example
Find overlapping classic exceptions

cloud_types - Check cloud types  syntax   single file
Checks that the package does not contain any object types unsupported in cloud ABAP.

colon_missing_space - Colon missing space quick fix whitespace  single file   example
Checks for missing spaces after colons in chained statements.

commented_code - Find commented code quick fix styleguide  single file   example
Detects usage of commented out code.

constant_classes - Validate constant classes styleguide
Checks that a class contains exactly the constants corresponding to a domain's fixed values.

constructor_visibility_public - Check constructor visibility is public styleguide  single file
Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.

contains_tab - Code contains tab quick fix whitespace styleguide  single file   example
Checks for usage of tabs (enable to enforce spaces)

cyclic_oo - Cyclic OO
Finds cyclic/circular OO references

cyclomatic_complexity - Cyclomatic Complexity  single file
Cyclomatic complexity, only reported for methods

dangerous_statement - Dangerous statement  security   single file
Detects potentially dangerous statements

db_operation_in_loop - Database operation in loop  single file   performance
Database operation in LOOP/DO/WHILE

definitions_top - Place definitions in top of routine quick fix  single file   example
Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.

description_empty - Description in class must exist
Ensures descriptions in class metadata exist.

double_space - Double space quick fix whitespace  single file   example
Checks that only a single space follows certain common statements.

downport - Downport statement quick fix downport
Downport functionality

dynpro_checks - Dynpro Checks  syntax
Various Dynpro checks

easy_to_find_messages - Easy to find messages styleguide
Make messages easy to find

empty_event - Empty selection screen or list processing event block  single file   example
Empty selection screen or list processing event block

empty_line_in_statement - Find empty lines in statements quick fix whitespace styleguide  single file   example
Checks that statements do not contain empty lines.

empty_statement - Remove empty statement quick fix  single file   example
Checks for empty statements (an empty statement is a single dot)

empty_structure - Find empty blocks styleguide  single file   example
Checks that the code does not contain empty blocks.

exit_or_check - Find EXIT or CHECK outside loops quick fix styleguide  single file
Detects usages of EXIT or CHECK statements outside of loops. Use RETURN to leave procesing blocks instead.

expand_macros - Expand Macros quick fix upport styleguide  example
Allows expanding macro calls with quick fixes

exporting - EXPORTING can be omitted quick fix styleguide  single file   example
Detects EXPORTING statements which can be omitted.

forbidden_identifier - Forbidden Identifier  single file
Forbid use of specified identifiers, list of regex.

forbidden_pseudo_and_pragma - Forbidden pseudo comments and pragma quick fix  single file   example
Checks for unwanted pseudo comments and pragma

forbidden_void_type - Forbidden Void Types
Avoid usage of specified void types.

form_tables_obsolete - TABLES parameters are obsolete  single file
Checks for TABLES parameters in forms.

fully_type_constants - Fully type constants  single file   example
Checks constants for full typing - no implicit typing allowed.

fully_type_itabs - Fully type internal tables  single file   example
No implict table types or table keys

function_module_recommendations - Function Module Recommendations  single file
Suggests replacements for various function modules

functional_writing - Use functional writing quick fix styleguide  single file   example
Detects usage of call method when functional style calls can be used.

global_class - Global class checks  syntax
Checks related to global classes

identical_conditions - Identical conditions  single file   example
Find identical conditions in IF + CASE + WHILE etc Prerequsites: code is pretty printed with identical cAsE

identical_contents - Identical contents  single file   example
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

identical_form_names - Identical FORM names  syntax
Detects identically named FORMs

if_in_if - IF in IF quick fix styleguide  single file   example
Detects nested ifs which can be refactored.

implement_methods - Implement methods quick fix  syntax
Checks for abstract methods and methods from interfaces which need implementing.

implicit_start_of_selection - Implicit START-OF-SELECTION  single file   example
Add explicit selection screen event handling

in_statement_indentation - In-statement indentation quick fix whitespace  single file   example
Checks alignment within statements which span multiple lines.

indentation - Indentation quick fix whitespace  single file   example
Checks indentation

inline_data_old_versions - Inline data, old versions  syntax   single file
Checks for inline data declarations in older releases. Only active for versions less than v740sp02

intf_referencing_clas - INTF referencing CLAS
Interface contains references to class

invalid_table_index - Invalid Table Index quick fix  single file   example
Issues error for constant table index zero, as ABAP starts from 1

keep_single_parameter_on_one_line - Keep single parameters on one line whitespace styleguide  single file   example
Keep single parameter calls on one line

keyword_case - Keyword case quick fix styleguide  single file   example
Checks that keywords have the same case. Non-keywords must be lower case.

line_break_multiple_parameters - Line break multiple parameters quick fix whitespace styleguide  single file   example
Line break multiple parameters

line_break_style - Makes sure line breaks are consistent in the ABAP code whitespace  single file
Enforces LF as newlines in ABAP files abapGit does not work with CRLF

line_length - Line length styleguide  single file
Detects lines exceeding the provided maximum length.

line_only_punc - Line containing only punctuation quick fix styleguide  single file   example
Detects lines containing only punctuation.

local_class_naming - Local class naming conventions naming  single file
Allows you to enforce a pattern, such as a prefix, for local class names.

local_testclass_consistency - Local testclass consistency  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 naming  single file   example
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 naming  single file   example
Allows you to enforce a pattern for macro definitions

main_file_contents - Main file contents
Checks related to report declarations.

many_parentheses - Too many parentheses quick fix  single file   example
Searches for expressions where extra parentheses can safely be removed

max_one_method_parameter_per_line - Max one method parameter definition per line whitespace  single file   example
Keep max one method parameter description per line

max_one_statement - Max one statement per line quick fix styleguide  single file   example
Checks that each line contains only a single statement.

message_exists - Check MESSAGE exists  syntax
In message statements, check that the message class + id exist

method_implemented_twice - Method implemented twice  syntax   single file
Reports an error if a method is implemented or defined twice

method_length - Method/Form Length styleguide  single file
Checks relating to method/form length.

method_overwrites_builtin - Method name overwrites builtin function naming styleguide  single file   example
Checks Method names that overwrite builtin SAP functions

method_parameter_names - Method parameter naming conventions naming  single file
Allows you to enforce a pattern, such as a prefix, for method parameter names

mix_returning - Mix of returning and exporting styleguide  single file   example
Checks that methods don't have a mixture of returning and exporting/changing parameters

modify_only_own_db_tables - Modify only own DB tables  security
Modify only own DB tables

msag_consistency - MSAG consistency check
Checks the validity of messages in message classes

names_no_dash - No dashes in FORM and DATA names naming  single file   example
Checks for a "-" in FORM, DATA, PARAMETER and SELECT-OPTION names

nesting - Check nesting depth styleguide  single file
Checks for methods exceeding a maximum nesting depth

newline_between_methods - New line between methods whitespace  single file
Checks for newlines between method implementations.

no_aliases - No ALIASES  single file
Detects use of the ALIAS statement

no_chained_assignment - No chained assignment styleguide  single file   example
Find chained assingments and reports issues

no_external_form_calls - No external FORM calls  single file   example
Detect external form calls

no_inline_in_optional_branches - Don't declare inline in optional branches styleguide  single file
Don't declare inline in optional branches

no_prefixes - No Prefixes styleguide  single file   example
Dont use hungarian notation

no_public_attributes - No public attributes styleguide  single file
Checks that classes and interfaces don't contain any public attributes. Exceptions are excluded from this rule.

no_yoda_conditions - No Yoda conditions  single file   example
Finds Yoda conditions and reports issues

nrob_consistency - Number range consistency  single file
Consistency checks for number ranges

object_naming - Object naming conventions naming
Allows you to enforce a pattern, such as a prefix, for object names

obsolete_statement - Obsolete statements quick fix styleguide  single file   example
Checks for usages of certain obsolete statements

omit_parameter_name - Omit parameter name quick fix styleguide  example
Omit the parameter name in single parameter calls

omit_preceding_zeros - Omit preceding zeros quick fix  single file   example
Omit preceding zeros from integer constants

omit_receiving - Omit RECEIVING styleguide  single file   example
Omit RECEIVING

parser_702_chaining - Parser Error, bad chanining on 702  syntax   single file
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  syntax   single file
Checks for syntax not recognized by abaplint. See recognized syntax at https://syntax.abaplint.org

parser_missing_space - Parser Error, missing space whitespace  syntax   single file   example
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.

pragma_style - Pragma Style  single file   example
Check pragmas placement and case

prefer_corresponding - Prefer corresponding( ) to MOVE-CORRESPONDING upport styleguide  single file   example
Prefer corresponding( ) to MOVE-CORRESPONDING, from v740sp05 and up

prefer_inline - Prefer Inline Declarations quick fix  experimental  upport styleguide  example
Prefer inline to up-front declarations.

prefer_is_not - Prefer IS NOT to NOT IS quick fix styleguide  single file   example
Prefer IS NOT to NOT IS

prefer_pragmas - prefer pragmas over pseudo comments  styleguide  single file   example
prefer pragmas over pseudo comments

prefer_raise_exception_new - Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE quick fix upport styleguide  single file   example
Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE

prefer_returning_to_exporting - Prefer RETURNING to EXPORTING styleguide  single file   example
Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.

prefer_xsdbool - Prefer xsdbool over boolc quick fix upport styleguide  single file   example
Prefer xsdbool over boolc

preferred_compare_operator - Preferred compare operator quick fix  single file   example
Configure undesired operator variants

prefix_is_current_class - Prefix is current class quick fix styleguide  single file
Reports errors if the current class or interface references itself with "current_class=>"

reduce_procedural_code - Reduce procedural code styleguide  single file   example
Checks FORM and FUNCTION-MODULE have few statements

reduce_string_templates - Reduce string templates  single file   example
Checks for string templates

release_idoc - Release iDoc
Checks idoc types and segments are set to status released

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.

rfc_error_handling - RFC error handling  single file   example
Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls

select_add_order_by - SELECT add ORDER BY  single file   example
SELECTs add ORDER BY clause

select_performance - SELECT performance  single file   performance   example
Various checks regarding SELECT performance.

select_single_full_key - Detect SELECT SINGLE which are possibily not unique quick fix
Detect SELECT SINGLE which are possibily not unique

selection_screen_naming - Selection screen naming conventions naming  single file
Allows you to enforce a pattern, such as a prefix, for selection-screen variable names.

sequential_blank - Sequential blank lines quick fix whitespace  single file
Checks that code does not contain more than the configured number of blank lines in a row.

short_case - Short CASE  single file   example
Checks for CASE statements which have fewer than the specified number of branches

sicf_consistency - SICF consistency
Checks the validity of ICF services

slow_parameter_passing - Slow Parameter Passing  performance   example
Detects slow pass by value passing for methods where parameter is not changed

space_before_colon - Space before colon quick fix whitespace  single file   example
Checks that there are no spaces in front of colons in chained statements.

space_before_dot - Space before dot quick fix whitespace styleguide  single file   example
Checks for extra spaces before dots at the ends of statements

sql_escape_host_variables - Escape SQL host variables quick fix upport  syntax  styleguide  example
Escape SQL host variables, from 740sp05

sql_value_conversion - Implicit SQL Value Conversion
Ensure types match when selecting from database

start_at_tab - Start at tab whitespace styleguide  single file   example
Checks that statements start at tabstops.

static_call_via_instance - Static call via instance variable styleguide
Static method call via instance variable

strict_sql - Strict SQL quick fix upport  example
Strict SQL

superclass_final - Super class final  syntax
Checks that classes which are inherited from are not declared as FINAL.

superfluous_value - Superfluous VALUE  single file   example
Find superfluous VALUE expressions

sy_modification - Modification of SY fields  single file   example
Finds modification of sy fields

tabl_enhancement_category - TABL enhancement category must be set
Checks that tables do not have the enhancement category 'not classified'.

tables_declared_locally - Check for locally declared TABLES  single file   example
TABLES are always global, so declare them globally

try_without_catch - TRY without CATCH  single file   example
Checks for TRY blocks without a CATCH and CLEANUP block

type_form_parameters - Type FORM parameters  single file   example
Checks for untyped FORM parameters

types_naming - TYPES naming conventions naming  single file   example
Allows you to enforce a pattern for TYPES definitions

uncaught_exception - Uncaught Exception  syntax
Checks for uncaught static exception

unknown_types - Unknown types  syntax
Enables check for unknown data types, respects errorNamespace

unnecessary_chaining - Unnecessary Chaining quick fix  single file   example
Find unnecessary chaining, all statements are checked

unnecessary_pragma - Unnecessary Pragma  single file   example
Finds pragmas which can be removed

unnecessary_return - Unnecessary Return quick fix  single file   example
Finds unnecessary RETURN statements

unreachable_code - Unreachable code  single file   example
Checks for unreachable code.

unsecure_fae - Unsecure FAE  experimental   performance
Checks for unsecure FAE

unused_ddic - Unused DDIC
Checks the usage of DDIC objects

unused_macros - Unused macros quick fix  example
Checks for unused macro definitions definitions

unused_methods - Unused methods quick fix
Checks for unused methods

unused_types - Unused types quick fix
Checks for unused TYPE definitions

unused_variables - Unused variables quick fix  example
Checks for unused variables and constants

use_bool_expression - Use boolean expression quick fix upport styleguide  single file   example
Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up

use_class_based_exceptions - Use class based exceptions styleguide  single file   example
Use class based exceptions, checks interface and class definitions

use_line_exists - Use line_exists upport styleguide  single file   example
Use line_exists, from 740sp02 and up

use_new - Use NEW quick fix upport styleguide  single file   example
Checks for deprecated CREATE OBJECT statements.

when_others_last - WHEN OTHERS last  single file   example
Checks that WHEN OTHERS is placed the last within a CASE statement.

whitespace_end - Whitespace at end of line quick fix whitespace  single file   example
Checks for redundant whitespace at the end of each line.

xml_consistency - XML consistency naming  syntax
Checks the consistency of main XML files, eg. naming for CLAS and INTF objects