Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ATC / Code Inspector - exclude naming conventions for derived methods

Former Member
0 Likes
2,481

Hi everyone,

we are using the ATC with a code inspector variant for extended naming conventions. (i.e. IMPORTING parameters of methods must be named i[:type:] where type can by s, t, o, ... for structure, table, object reference, etc.)

As we also use the ATC exemption system the problem is that there are (false positive) findings for parameters of methods derived from a superclass / interface which don't  comply with the naming conventions but which you cannot edit. Is there a way to exclude those standard checks for derived methods?

Thanks for an answer and best regards,

Stefan

1 ACCEPTED SOLUTION
Read only

former_member184455
Active Participant
0 Likes
1,578

Hi Stefan,

I wonder about this, since as far as I know the naming convention check only checks the definition of some parameter, and not its usage. So if a parameter is defined in an interface or a superclass, a check of the derived class should not return any message with regards to the naming convention compliance of this parameter. If you find such a behavior, please open an OSS message.

Best Regards,

Randolf

7 REPLIES 7
Read only

wol
Active Participant
0 Likes
1,578

Hello Stefan,

we have the same problem but it occurs rarely and I am curious for any other suggestions than mine:

The only idea I have is to derive the ABAP Testclass for naming conventions

CL_CI_TEST_ABAP_NAMING and extend it with something like compiler directives.

Regards

Stefan

Read only

former_member184455
Active Participant
0 Likes
1,579

Hi Stefan,

I wonder about this, since as far as I know the naming convention check only checks the definition of some parameter, and not its usage. So if a parameter is defined in an interface or a superclass, a check of the derived class should not return any message with regards to the naming convention compliance of this parameter. If you find such a behavior, please open an OSS message.

Best Regards,

Randolf

Read only

0 Likes
1,578

Hi Randolf,

thanks for your answer. You are right, of course, I was not specific enough to describe the problem.

The findings only occur in the constructor method of derived exception classes. Because the method signature (importing parameters) is generated from the (derived) instance attributes of the exception class the naming conventions aren't matched and there is an unwanted code inspector finding.

Is there a a way to exclude the constructor's method signature of exception classes from the check?

best regards,

Stefan

Read only

0 Likes
1,578

Hi Stefan,

Not that I'd know of. I will ask the developer of the check.

Wouldn't it be possible to take exception classes ('ZCX_*') out of the inobject set to be inspected wrt naming conventions?

Best Regards, Randolf

Read only

0 Likes
1,578

Hi Randolf,

I also thought of that but that would mean the entire class wouldn't be checked.

Another idea would be to include the standard import parameters of an exception's constructor method (PREVIOUS etc.) in the whitelist for import parameter names for abap oo.

If you would ask the developer that would be great; the findings occur with the extended check for naming conventions.

Best regards.

Stefan

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,578

I will ask the developer of the check

I'm so jealous of you -

Read only

0 Likes
1,578

Hi Stefan,

There are several sites where ABAP code is generated and the user cannot influence the naming - it would be cumbersome / impossible to exclude all these from checking.

The developer of the check also recommended to exclude the generated classes from the object set.

Best Regards, Randolf