Skip to content

1.14.0 #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4d0917a
1.14.0
lucasborin Mar 31, 2021
2ca282b
fixing version
lucasborin Mar 31, 2021
1b61970
Merge branch 'master' into 1.14.0
lucasborin Mar 31, 2021
e56422a
adding missing checks feature (#346)
lucasborin Apr 1, 2021
a2609e3
Update changelog.txt
lucasborin Apr 1, 2021
eb50aa1
Merge branch 'master' into 1.14.0
lucasborin Apr 5, 2021
14dcd67
Standard Functions in Prefer IS NOT to NOT IS (#353)
lucasborin Apr 6, 2021
bdebcfc
Prefer New to Create Object (#354)
lucasborin Apr 6, 2021
0b57c21
Unit Test Assert Check (#347)
lucasborin Apr 6, 2021
ebf261e
Update y_check_unit_test_assert.clas.abap
Apr 7, 2021
8b9f804
Update y_check_unit_test_assert.clas.abap
Apr 7, 2021
4da128b
Part 1 - core feature - allow pseudo comment exception #329 (#357)
Apr 7, 2021
045d311
Revert "Part 1 - core feature - allow pseudo comment exception #329 (…
lucasborin Apr 7, 2021
e7965e1
Merge branch 'master' into 1.14.0
lucasborin Apr 8, 2021
88b0182
fixes #359 (#366)
lucasborin Apr 8, 2021
16d6349
Update changelog.txt
lucasborin Apr 8, 2021
732f8b5
New abapLint Rules (#304)
lucasborin Apr 8, 2021
cb162c4
Update changelog.txt
lucasborin Apr 8, 2021
12d0200
Update y_check_base.clas.abap
lucasborin Apr 9, 2021
98879fd
Update src/foundation/y_check_base.clas.abap
lucasborin Apr 9, 2021
288335a
Update unit_test_assert.md
lucasborin Apr 9, 2021
9a3cbc3
Feature allow pseudo comment exception (#361)
lucasborin Apr 13, 2021
612b9bc
Prefer LINE_EXISTS or LINE_INDEX to READ TABLE or LOOP AT (#355)
lucasborin Apr 13, 2021
cb16c2c
Update changelog.txt
lucasborin Apr 13, 2021
6a0388c
Merge branch 'master' into 1.14.0
lucasborin Apr 13, 2021
159848e
Update abaplint.json (#377)
lucasborin Apr 14, 2021
3f7b445
adjust of ignore pseudocomment on relevant checks (#375)
Apr 15, 2021
5f04a10
changing default severity (#376)
lucasborin Apr 15, 2021
c70dabb
Merge branch 'master' into 1.14.0
lucasborin Apr 15, 2021
3907713
Update changelog.txt
lucasborin Apr 19, 2021
3cae21a
Update changelog.txt
lucasborin Apr 22, 2021
45b7eff
Update changelog.txt
lucasborin Apr 23, 2021
0b7bcde
fixing broken ut
lucasborin Apr 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 27 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@
# code pal for ABAP

[![abap package version](https://img.shields.io/endpoint?url=https://shield.abap.space/version-shield-json/github/SAP/code-pal-for-abap/src/y_code_pal_version.intf.abap/abap&label=version)](https://github.com/SAP/code-pal-for-abap/blob/master/changelog.txt)
[![abap package version](https://img.shields.io/endpoint?url=https://shield.abap.space/version-shield-json/github/SAP/code-pal-for-abap/src/y_code_pal_version.intf.abap/abap&label=version)](changelog.txt)
[![license](https://img.shields.io/github/license/SAP/code-pal-for-abap)](LICENSE)

This tool supports you in writing a clean ABAP code. Clean Code allows you to read your code like well-written prose, it is easily understandable, maintainable, and extensible. In addition, you can write high quality and reliable Unit Tests without hurdles and thereby reduce the total cost of ownership of the software.
Based on the [Clean ABAP](https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md) style guide, this tool contains a set of checks to guarantee the [Clean ABAP](https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md) adherence.
Together, we both support you in writing a clean ABAP code.

Furthermore... It's **free** and **open-source**!
❣️ It's **free** and **open-source**.

It is licensed under the Apache License, Version 2.0 - see [LICENSE](LICENSE).

## News

**:warning: Migration Required :warning:**

From version `v1.01.0` to `v1.02.0` the folder logic was changed, and the abapGit is not able to perform this migration automatically. Therefore, please, follow the step-by-step described in [How To Migrate](pages/how-to-migrate.md)!
## Features

Check the [change log](changelog.txt) for further information.
- Supported by Code Inspector (`SCI` / `SCII`) and ABAP Test Cockpit (ATC) (`SE80` / Eclipse);
- Ignores automatically generated code;
- Supports exemptions;
- Provides a new user-friendly way to create variants ([Profile Management](pages/how-to-configure.md));
- Allows configuration based on:
- Threshold;
- Severity / Priority;
- Validity for productive code, test code, or both;
- Validity for objects created since a specific date;
- Validity period;
- Allow / Deny exemption.

⚠️ Tool is not RFC-Enabled ([#268](https://github.com/SAP/code-pal-for-abap/issues/268)).

## Features
⚠️ Severities set to `Notification` / `Priority 3` by default ([#368](https://github.com/SAP/code-pal-for-abap/issues/368)).

- Checks are ready-to-use;
- Checks can be executed via SUT, SCI, SCII (Code-Inspector) and via ATC (e.g. directly in SE80, Eclipse...);
- Automatic exclusion of code which shall not be checked (e.g. generated code);
- The scope is customizable (filter option on object creation date);
- Thresholds are customizable;
- Message severity is customizable (error, warning, or notification);
- Checking may be activated in productive-code and/or test-code (customizable);
- Findings can be suppressed via Code-Inspector Pragmas;
- Usage of a "Profile Management Tool" (Optional).

The Profile Management Tool, which is an alternative of working with SCI based variant(s), offers among others:
- An user friendly UI;
- A user-based or group-based execution of Checks;
- Creation, assignment and unassignment of Profiles (unassigning a profile will only delete it if no checks are registered to this profile);
- Import/Export a profile among systems (download/upload function – UI button or API Post Service);
- Single-Click registration of all code pal checks at once to a profile (UI button);
- Multiple execution of several profiles at the same time (the sharpest/strongest and time valid configuration/threshold will be taken);
- Delegation principle to facilitate team work (all delegates, for instance: team members, can work with the same profile);

:warning: The checks are not RFC-Enabled due to local dependencies.

## List of Checks
## Set of Checks

- [Check Documentation](docs/check_documentation.md)

Expand All @@ -56,11 +42,14 @@ The Profile Management Tool, which is an alternative of working with SCI based v
- **[Execute](pages/how-to-execute.md)**
- **[Contribute](pages/how-to-contribute.md)**

## Further Reading
## Recommended Readings

- [ABAP Styleguides on Clean Code](https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md)
- [Writing Testable Code for ABAP](https://open.sap.com/courses/wtc1/items/2gzG0sRlN1yjkTUREB02L9)
- [ABAP Development for S/4HANA](https://open.sap.com/courses/a4h1)
- [Clean ABAP](https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md)
- [ABAP 7.40 Quick Reference](https://blogs.sap.com/2015/10/25/abap-740-quick-reference/)
- [ABAP Built-in Functions](https://blogs.sap.com/2015/11/30/reminder-abap-built-in-functions/)
- [ABAP - Release-Specific Changes](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abennews.htm)

## Recommended Courses

- [Writing Testable Code for ABAP](https://open.sap.com/courses/wtc1/items/2gzG0sRlN1yjkTUREB02L9)
- [ABAP Development for S/4HANA](https://open.sap.com/courses/a4h1)
207 changes: 65 additions & 142 deletions abaplint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,230 +12,153 @@
"url": "https://github.com/abaplint/deps",
"folder": "/deps1",
"files": "/src/**/*.*"
},
{
"url": "https://github.com/abapGit/abapGit",
"folder": "/deps2",
"files": "/src/**/*.*"
}
],
"syntax": {
"version": "v740sp08",
"errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)",
"errorNamespace": "^(Y)",
"globalConstants": ["cntb_btype_button", "scan_struc_stmnt_type", "scan_stmnt_type", "scan_struc_type", "scan_token_type"],
"globalMacros": []
},
"rules": {
"7bit_ascii": true,
"abapdoc": false,
"allowed_object_naming": true,
"allowed_object_types": {
"exclude": [],
"severity": "Error",
"allowed": []
},
"allowed_object_types": false,
"ambiguous_statement": false,
"avoid_use": {
"exclude": [],
"severity": "Error",
"define": true,
"endselect": true,
"execSQL": true,
"kernelCall": true,
"communication": true,
"statics": true,
"systemCall": true,
"defaultKey": false,
"break": false,
"describeLines": false
},
"avoid_use": false,
"begin_end_names": true,
"begin_single_include": true,
"call_transaction_authority_check": true,
"chain_mainly_declarations": {
"exclude": [],
"severity": "Error",
"definitions": true,
"write": true,
"move": true,
"refresh": true,
"unassign": true,
"clear": true,
"hide": true,
"free": true,
"include": true,
"check": true
},
"call_transaction_authority_check": false,
"chain_mainly_declarations": true,
"check_abstract": true,
"check_comments": false,
"check_ddic": true,
"check_ddic": false,
"check_include": true,
"check_no_handler_pragma": true,
"check_subrc": false,
"check_syntax": true,
"check_text_elements": false,
"check_transformation_exists": true,
"check_transformation_exists": false,
"class_attribute_names": false,
"cloud_types": true,
"colon_missing_space": true,
"commented_code": false,
"commented_code": true,
"constructor_visibility_public": true,
"contains_tab": false,
"cyclomatic_complexity": {
"exclude": [],
"severity": "Error",
"max": 20
},
"definitions_top": false,
"cyclomatic_complexity": true,
"dangerous_statement": true,
"db_operation_in_loop": false,
"definitions_top": true,
"description_empty": true,
"double_space": false,
"double_space": {
"startParen": false
},
"downport": true,
"empty_line_in_statement": false,
"empty_statement": true,
"empty_structure": false,
"empty_structure": true,
"exit_or_check": false,
"exporting": false,
"forbidden_identifier": {
"exclude": [],
"severity": "Error",
"check": []
},
"forbidden_pseudo_and_pragma": {
"exclude": [],
"severity": "Error",
"pseudo": [],
"pragmas": [],
"ignoreGlobalClassDefinition": false,
"ignoreGlobalInterface": false
},
"forbidden_void_type": {
"exclude": [],
"severity": "Error",
"check": []
},
"exporting": true,
"forbidden_identifier": false,
"forbidden_pseudo_and_pragma": false,
"forbidden_void_type": false,
"form_tables_obsolete": true,
"fully_type_constants": {
"exclude": [],
"severity": "Error",
"checkData": true
},
"fully_type_constants": false,
"function_module_recommendations": true,
"functional_writing": {
"exclude": [],
"severity": "Error",
"ignoreExceptions": true
},
"functional_writing": true,
"global_class": true,
"identical_conditions": true,
"identical_contents": true,
"identical_form_names": true,
"identical_descriptions": false,
"if_in_if": true,
"implement_methods": true,
"in_statement_indentation": false,
"indentation": false,
"inline_data_old_versions": true,
"keep_single_parameter_on_one_line": false,
"keyword_case": false,
"line_break_multiple_parameters": false,
"intf_referencing_clas": {
"allow": ["cl_ci_scan"]
},
"keep_single_parameter_on_one_line": true,
"line_break_multiple_parameters": true,
"line_break_style": true,
"line_length": false,
"line_only_punc": false,
"local_class_naming": false,
"local_testclass_location": true,
"local_variable_names": false,
"main_file_contents": true,
"many_parenthesis": false,
"many_parenthesis": true,
"max_one_method_parameter_per_line": true,
"method_implemented_twice": true,
"max_one_statement": true,
"message_exists": true,
"method_length": false,
"method_overwrites_builtin": false,
"method_overwrites_builtin": true,
"method_parameter_names": false,
"mix_returning": false,
"mix_returning": true,
"modify_only_own_db_tables": false,
"msag_consistency": true,
"nesting": false,
"nesting": true,
"names_no_dash": true,
"newline_between_methods": {
"exclude": [],
"severity": "Error",
"count": 3,
"logic": "less"
},
"newline_between_methods": true,
"no_public_attributes": false,
"no_yoda_conditions": false,
"object_naming": false,
"obsolete_statement": {
"exclude": [],
"severity": "Error",
"refresh": true,
"compute": true,
"add": false,
"subtract": false,
"multiply": true,
"move": true,
"divide": true,
"requested": true,
"occurs": true,
"setExtended": true,
"withHeaderLine": true,
"fieldSymbolStructure": true,
"typePools": true,
"load": true
},
"omit_parameter_name": false,
"obsolete_statement": true,
"omit_parameter_name": true,
"omit_receiving": true,
"parser_702_chaining": false,
"parser_error": true,
"parser_missing_space": true,
"prefer_inline": false,
"prefer_is_not": false,
"prefer_is_not": true,
"prefer_raise_exception_new": true,
"prefer_returning_to_exporting": true,
"prefer_xsdbool": true,
"preferred_compare_operator": false,
"prefix_is_current_class": false,
"preferred_compare_operator": true,
"prefix_is_current_class": true,
"reduce_string_templates": true,
"release_idoc": true,
"remove_descriptions": false,
"rfc_error_handling": false,
"selection_screen_naming": {
"exclude": [],
"severity": "Error",
"patternKind": "required",
"ignoreNames": [],
"ignorePatterns": [],
"parameter": "^P_.+$",
"selectOption": "^S_.+$"
},
"sequential_blank": false,
"short_case": {
"exclude": [],
"severity": "Error",
"length": 1,
"allow": []
"rfc_error_handling": true,
"select_add_order_by": false,
"select_performance": {
"severity": "Warning"
},
"selection_screen_naming": false,
"sequential_blank": true,
"short_case": true,
"sicf_consistency": true,
"space_before_colon": true,
"space_before_dot": {
"exclude": [],
"severity": "Error",
"ignoreGlobalDefinition": true,
"ignoreExceptions": true
"space_before_dot": true,
"sql_escape_host_variables": {
"severity": "Warning"
},
"sql_escape_host_variables": false,
"start_at_tab": false,
"start_at_tab": true,
"superclass_final": true,
"sy_modification": true,
"tabl_enhancement_category": true,
"try_without_catch": true,
"type_form_parameters": true,
"types_naming": false,
"uncaught_exception": false,
"unknown_types": true,
"unreachable_code": true,
"unused_methods": false,
"unsecure_fae": false,
"unused_methods": true,
"unused_types": true,
"unused_variables": false,
"unused_variables": {
"severity": "Warning"
},
"use_bool_expression": true,
"use_line_exists": false,
"use_class_based_exceptions": true,
"use_line_exists": true,
"use_new": true,
"when_others_last": true,
"whitespace_end": true,
"xml_consistency": true
"xml_consistency": true,
"keyword_case": false
}
}
Loading