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 'insert empty line before ANY statement' option to rule "Standardize empty lines within methods" #321

Open
hansdampfinger666 opened this issue Jun 14, 2024 · 1 comment

Comments

@hansdampfinger666
Copy link

hansdampfinger666 commented Jun 14, 2024

I'm in the "always inline declare and define and declare and define as close as possible to definitions" and not the "declare all variables at the start of any function" crowd.

So it'd be nice to have an option in the rule "Standardize empty lines within methods" rule, that instead of adding an empty line before any executable statement adds an empty line before any statement in a method.

This would maybe require a checkbox so either or option can be chosen.

So this:

  METHOD get_next_config_id.

    DATA lt_sddocs TYPE TABLE OF sales_key.
    lt_sddocs = VALUE #( ( vbeln = mv_contract ) ).
    DATA lt_cucfg TYPE TABLE OF bapicucfgm.

Doesn't get changed to this:

  METHOD get_next_config_id.

    DATA lt_sddocs TYPE TABLE OF sales_key.

    lt_sddocs = VALUE #( ( vbeln = mv_contract ) ).
    DATA lt_cucfg TYPE TABLE OF bapicucfgm.

Thanks all for your amazing work.

@mAltr
Copy link

mAltr commented Jun 18, 2024

This would be indeed an good option. Old legacy programmers prefer the second style. Based on the clean code samples, the first style would be also nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants