|
4 | 4 |
|
5 | 5 | ## How to Configure
|
6 | 6 |
|
7 |
| -**The default customizing (initial values) is not an SAP delivered standard value.** |
| 7 | +⚠️This documentation describes how to configure using the `Profile Management Tool` feature only. |
8 | 8 |
|
9 |
| -The tool is 100% compatible with the SAP CI Framework (Code Inspector). That is, SAP Transactions: SCI and SCII. By means of these transactions, it is possible to create/run/save an inspection using our delivered CHECKS (the checks can be found under the "CODE PAL FOR ABAP" category). |
10 |
| -It is also possible to create a CI-Variant and run the selected CHECKS using this variant at any time. This CI-Variant can be also used in SUT (ABAP CHECK REPORT), ATC or even using SAP-Workbench ABAP Editors (e.g.: SE80) or ADT (e.g.: Eclipse) with ATC/CI Integration directly (the CI-Variant will be asked). |
| 9 | +💡Alternatively, you can use the SAP Code Inspector variants in the `SCI` transaction. |
11 | 10 |
|
12 |
| -In summary, it is possible to use our tool directly in SCI/SCII, via ATC Integration, via API Call, via SUT, via CI-Variant or via Profile(s). |
13 |
| -But keep in mind, one has to choose betweeen using CI-Variants (Code Inspector Variants) or Using Profile/s (via Transaction: Y_CODE_PAL_PROFILE, delivered along with the toolkit). Both features cannot be used in paralell in the same system for the same user. For more details on using CI-Variant/s and Profile/s, please check the section: [How to Execute](https://github.com/SAP/code-pal-for-abap/blob/master/pages/how-to-execute.md). |
| 11 | +Table of Contents: |
14 | 12 |
|
15 |
| -Furtheremore, every single CHECK can be configurable independenlty. |
| 13 | +- [How to Configure](#how-to-configure) |
| 14 | + - [Profiles](#1-profiles) |
| 15 | + - [Delegates](#2-delegates) |
| 16 | + - [Checks](#3-checks) |
| 17 | +- [Further Features](#further-features) |
| 18 | + - [Import / Export Profile](#import--export-profile) |
| 19 | + - [Import via API](#import-via-api) |
| 20 | + - [Add / Remove All Checks](#add--remove-all-checks) |
| 21 | + - [Add Missing Checks](#add-missing-checks) |
16 | 22 |
|
17 |
| -By the Check configuration: You can, |
| 23 | +💡 The transaction `Y_CODE_PAL_PROFILE` provides access to the `Profile Management Tool`. |
18 | 24 |
|
19 |
| -* Define check's validity period; |
20 |
| -* Restrict to objects created since a specific date; |
21 |
| -* Define check's severity; |
22 |
| -* Define check's threshold (if applicable); |
23 |
| -* Define if it is applicable in productive code (if applicable); |
24 |
| -* Define if it is applicable in test code (if applicable); |
25 |
| -* Define if it allows exemption via pseudo comments (if applicable). |
| 25 | +### Profiles |
26 | 26 |
|
27 |
| -Check behavior: |
| 27 | +> Profiles are similar to Code Inspector Variants. |
28 | 28 |
|
29 |
| -* If using a CI-Variant, just one variant can be executed per time. |
30 |
| -* If using a profile, first, at least one profile should be assigned to your user. Then, all checks assigned to this profle will be executed. But if so, the usage of a CI-variant is no longer possible. The profile overrules a CI-variant! In order to use again a CI-variant, one has to unassign the profile(s) of his/her user; |
31 |
| -* If multiple profiles are assigned to your user, all checks assigned to all profiles will be executed and the "strongest" or "sharpest" thresholds will be taken; |
32 |
| -* If have no profile assigned to your user, the execution of the checks have to be made live in SCI/SCII or by means of a CI-Variant. |
| 29 | +Behavior: |
33 | 30 |
|
34 |
| -Profile behavior: |
| 31 | +- (❗) If you assign a Profile to your user, **it overwrites the Code Inspector variant** (❗); |
| 32 | +- If you assign multiple Profiles to your user, the tool will combine them in runtime; |
| 33 | +- You can assign someone else Profile to your user; |
| 34 | +- The Profile is deleted once it has no check and assigned to nobody. |
35 | 35 |
|
36 |
| -* If you unassign a profile from your user, it will not delete it from the database. It means, you can reassign it to your user, and all the checks with respective customization will return; |
37 |
| -* If you assign the `Y_CHECK_PROFILE_MESSAGE` check to the profile, you will receive an info message every time you execute the global check variant. It means, not all the checks from the variant were executed, but so the ones related to the active profile. |
| 36 | +To create or assign it, click on the `+` button, and inform the Profile name: |
38 | 37 |
|
39 |
| -Threshold behavior: |
40 |
| - |
41 |
| -* If you have multiple profiles, and the same check assigned to two or more profiles, it will use the check with the strongest threshold. |
42 |
| - |
43 |
| -### 1. Create or Assign a Profile |
| 38 | + |
44 | 39 |
|
45 |
| -Start transaction `Y_CODE_PAL_PROFILE`, click on the `+` button, and inform the profile name. |
| 40 | +### Delegates |
46 | 41 |
|
47 |
| - |
| 42 | +> Delegates are the Profile owners who are allowed to configure it; |
| 43 | +> Multiple delegates are allowed. |
48 | 44 |
|
49 |
| -You can assign an already existing profile to your user. It is useful for working on a team based on the same checks. |
| 45 | +Behavior: |
50 | 46 |
|
51 |
| -### 2. Assign Delegates |
| 47 | +- If you aren't a Delegate, you won't be able to add / change / remove a Delegate or Check. |
52 | 48 |
|
53 |
| -Delegates are users which can maintain the checks. As you are creating a new check, you will be added automatically. In case you want to add someone else as an owner, click on the `+` button and inform his/her user name. |
| 49 | +To add someone else, click on the `+` button and inform his / her user name: |
54 | 50 |
|
55 | 51 | 
|
56 | 52 |
|
57 |
| -### 3. Assign Checks |
| 53 | +### Checks |
58 | 54 |
|
59 |
| -Click on the `+` button and assign the checks. |
| 55 | +> Checks are the rules based on the [Clean ABAP](https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md) style guide. |
60 | 56 |
|
61 |
| - |
| 57 | +Behavior: |
| 58 | + |
| 59 | +- You can define a Check threshold (if applicable); |
| 60 | +- You can define a Check severity / priority (error / priority 1, warning / priority 2, or notification / priority 3) |
| 61 | +- You can define a Check filter on productive code, test code, or both (if applicable); |
| 62 | +- You can define a Check filter on object creation date; |
| 63 | +- You can define a Check validity period; |
| 64 | +- You can define if a Check can/cannot be exempt via pseudo-comments (if applicable). |
| 65 | +- If you have multiple Profiles assigned to your user, the check with the"strongest" or "sharpest" thresholds will be taken; |
| 66 | + |
| 67 | +To assign them to your Profile, click on the `+` button: |
62 | 68 |
|
63 |
| -If you want, you can change the default configuration: |
| 69 | + |
64 | 70 |
|
65 | 71 | 
|
66 | 72 |
|
67 |
| -If you do not understand the check meaning, you can check its documentation: |
| 73 | +💡 You can use the documentation button to navigate to the Check documentation: |
68 | 74 |
|
69 | 75 | 
|
70 | 76 |
|
71 |
| -## How to export and import customization |
| 77 | +## Further Features |
72 | 78 |
|
73 |
| -You can export and import profiles, with respective delegates and checks, using a `JSON` file. |
| 79 | +### Import / Export Profile |
74 | 80 |
|
75 |
| -It is useful when you work with multiple systems, and you want to sync the profiles between them. |
| 81 | +You can import and export a Profile with its Delegates and Checks using a `JSON` file, here: |
76 | 82 |
|
77 | 83 | 
|
78 | 84 |
|
79 | 85 | ### Import via API
|
80 | 86 |
|
81 | 87 | Once you export a profile to a `JSON` file, you can import it using the service created in the [How To Install](how-to-install.md) guide.
|
82 | 88 |
|
83 |
| -To consume the API, you have to `POST` the `JSON` file to the service with the respective authentication you configured to the service (usually basic, user/pass) and with the header `Content-Type` as `application/json` and `action` as `import_profile`. |
| 89 | +To consume the API, you have to `POST` the `JSON` file to the service with the respective authentication you configured to the service (usually basic, user/pass) and with the headers `Content-Type` as `application/json` and `action` as `import_profile`. |
| 90 | + |
| 91 | +Possible returns: |
| 92 | + |
| 93 | +- `HTTP 400 - Bad Request` if the file format is not valid, or if the request has a wrong `Content-Type`; |
| 94 | +- `HTTP 403 - Forbidden` if the profile already exists in the system and the authentication user is not listed as a delegate; |
| 95 | +- `HTTP 500 - Internal Server Error` if the functionality is not working as expected. |
| 96 | + |
| 97 | +### Add / Remove All Checks |
| 98 | + |
| 99 | +You can add all and remove all the Checks from a Profile, here: |
| 100 | + |
| 101 | + |
84 | 102 |
|
85 |
| -The API returns an `HTTP 400 - Bad Request` if the file format is not valid, or if the request has a wrong `Content-Type`. |
| 103 | +### Add Missing Checks |
86 | 104 |
|
87 |
| -The API returns an `HTTP 403 - Forbidden` if the profile already exists in the system and the authentication user is not listed as a delegate. |
| 105 | +You can add all the missing checks, comparing your Profile and the available Checks, here: |
88 | 106 |
|
89 |
| -The API returns an `HTTP 500 - Internal Server Error` if the functionality is not working as expected. |
| 107 | + |
0 commit comments