Skip to content

Enable blank_line_before_statement #4790

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

Merged

Conversation

paulbalandan
Copy link
Member

@paulbalandan paulbalandan commented Jun 7, 2021

Description
This adds an empty line feed to precede the configured statements. This improves readability.

Available (and used) statements are:

      //  'break',
        'case',
        'continue',
        'declare',
        'default',
        'do',
        'exit',
        'for',
        'foreach',
        'goto',
      // 'if',
      // 'include',
      // 'include_once',
      // 'require',
      // 'require_once',
        'return',
        'switch',
        'throw',
        'try',
        'while',
        'yield',
        'yield_from',

Checklist:

  • Securely signed commits

@MGatner
Copy link
Member

MGatner commented Jun 7, 2021

The only one I am not a fan of is break. I do also like to smush my sequential if statements together whether they are a staccato series of related checks - I don't know if we can differentiate "sequential ifs" but I would be mildly in favor of exempting those as well.

@paulbalandan paulbalandan force-pushed the blank-line-before-statement branch from 83820a8 to 7b37453 Compare June 7, 2021 17:26
@paulbalandan
Copy link
Member Author

I updated and re-run to exclude if and break also.

@paulbalandan paulbalandan requested a review from MGatner June 7, 2021 17:29
@paulbalandan paulbalandan merged commit 9b51c1a into codeigniter4:develop Jun 8, 2021
@paulbalandan paulbalandan deleted the blank-line-before-statement branch June 8, 2021 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants