Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in using pseudo comment "#EC EQUALS_CHAINING #569

Open
sachin-b-k opened this issue Aug 4, 2022 · 5 comments
Open

Issue in using pseudo comment "#EC EQUALS_CHAINING #569

sachin-b-k opened this issue Aug 4, 2022 · 5 comments
Labels
bug Something isn't working correctly

Comments

@sachin-b-k
Copy link

馃挕 Code pal for ABAP follows the Clean ABAP. If the issue relates to coding style, please submit it here.

Check Name

Equals Sign Chaining

Actual Behavior

NA

Expected Behavior

NA

Issue

After inserting the pseudo-comment "#EC EQUALS_CHAINING in the code to deactivate the finding. The result was a complaint from the SLIN code check (SE24, Extended Check). It says "The pseudo comment "#EC EQUALS_CHA is not a valid SLIN pseudo comment." and "Cannot be deactivated using a pragma. Message Code BRE 0807". The same issue was coming for pseudo comment "#EC EMPTY_CATCH but its resolved after using the pseudo comment "#EC NO_HANDLER.

@sachin-b-k sachin-b-k added the bug Something isn't working correctly label Aug 4, 2022
@bjoern-jueliger-sap
Copy link
Member

bjoern-jueliger-sap commented Aug 4, 2022

This is a general issue with most Code Pal pseudo comments. The SLIN considers all pseudo comments that do not start with CI_ and that are not SLIN pseudo comments as invalid. NO_HANDLER is accepted because this is also the SLIN pragma/pseudo comment for empty CATCH blocks.

This was apparently not known to the initial authors of the Code Pal checks and now it would be incompatible to remove the invalid pseudo comments from Code Pal. The only possible "solution" I can see would be to add secondary pseudo comments to all Code Pal checks that then start with CI_.

@sachin-b-k
Copy link
Author

Is there a plan to to add secondary pseudo comments to all Code Pal checks that then start with CI_. If yes by when this would be implemented ?

@bjoern-jueliger-sap
Copy link
Member

This is a project that's open to community contributions - features will be implemented when someone submits a pull request that implements them. In general, open issues such as this one represent planned/requested improvements, but there is no fixed timeline for when this will happen.

Aside from this, there is also a problem with adding CI_* comments because some checks already have two possible pseudo-comments and the Code Inspector does not allow checks to specify more than two pseudo comments. This doesn't mean we shouldn't add them for those checks where it's possible, just something to keep in mind.

@sachin-b-k
Copy link
Author

In case of checks which are already having two possible pseudo-comments, is there a possibility to replace one of the existing pseudo comment with a new CI_* comment ?

@bjoern-jueliger-sap
Copy link
Member

Unfortunately not really: Replacing a comment means that all existing instances of the comment lose their effect, which is an incompatible change that will upset all users that have already used this comment in their code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants