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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add missing parameters to ABAPDoc" rules for unit-test methods #103

Closed
suynwa opened this issue Sep 7, 2023 · 4 comments
Closed

"Add missing parameters to ABAPDoc" rules for unit-test methods #103

suynwa opened this issue Sep 7, 2023 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@suynwa
Copy link

suynwa commented Sep 7, 2023

I have a minor gripe regarding the rule Add missing parameters to ABAPDoc in the context of aUnit methods.

Before running abapCleaner:

    "! It should not add missing param CX_STATIC_CHECK 
    methods SHOULD_NOT_ADD_ABAP_DOC for testing raising CX_STATIC_CHECK.

After running abapCleaner:

    "! It should not add missing param CX_STATIC_CHECK
    "!
    "! @raising cx_static_check | 
    methods SHOULD_NOT_ADD_ABAP_DOC for testing raising CX_STATIC_CHECK.

IMO, this rule should not be run in the context of aUnit methods. Maybe it is a case of personal taste 😉

@jmgrassau
Copy link
Member

Hi Suhas,

just to be sure, the idea would be to add an option suppressing this rule in the context of FOR TESTING methods? (Or even FOR TESTING classes as a whole, so it wouldn't run on helper methods in those classes, either?)

If this is not specific to test code versus product code, this option would help:

image

Kind regards,
Jörg-Michael

@suynwa
Copy link
Author

suynwa commented Sep 8, 2023

Hi Jörg-Michael,

I would rather skip the rule for aunit methods instead of providing an option. I don't think any one would like to document exceptions for aunit methods.

methods SHOULD_NOT_ADD_ABAP_DOC for testing raising CX_STATIC_CHECK.

In case some one wants to document these exceptions, (s)he can use the ADT quickfix (Ctrl+1) "Add missing parameters to documentation".

KR,
Suhas

@jmgrassau jmgrassau self-assigned this Sep 22, 2023
@jmgrassau jmgrassau added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 22, 2023
@jmgrassau
Copy link
Member

Hi Suhas,

alright, this will be changed with the next release, meaning that no ABAP Doc line is added for exceptions of test methods. Nevertheless, if exceptions are already documented,

  • existing ABAP Doc lines are kept if the exceptions are still raised
  • they are removed if the exception was removed
  • their order is aligned.

image

Instead of an option, I added some documentation …

image

… so if someone comes up with convincing arguments why they need this, we could still add an option for it at a later point in time.

Kind regards,
Jörg-Michael

@jmgrassau
Copy link
Member

Hi Suhas,

thanks again for this issue – this is now included in version 1.5.4 which was just released!

Kind regards,
Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants