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

Remove useless code separator comments #4946

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

paulbalandan
Copy link
Member

Description
...unless used as headers (except the header use is πŸ™„ or πŸ€·β€β™‚οΈ)

Checklist:

  • Securely signed commits

@sfadschm
Copy link
Contributor

Never thought there are ao many of them ...

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow the number of these caught me off guard! I can't promise I'm done with dividers but I'm glad to see most of these go.

// @codeCoverageIgnoreStart
exit($code);
// @codeCoverageIgnoreEnd
exit($code); // @codeCoverageIgnore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance there is a CS Fixer or Rector rule for converting these start-end for single lines? @samsonasik

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing before and after comment (before and next different line) is doable with rector, but I am not sure about placing comment on single line directly right after statement. Probably need to extends the pComments() method:

https://github.com/nikic/PHP-Parser/blob/c758510a37218d631fd10f67bca5bccbfef864fa/lib/PhpParser/PrettyPrinterAbstract.php#L449-L457

with some kind of custom attribute to flag single line.

@paulbalandan paulbalandan merged commit a6cfb8c into codeigniter4:develop Jul 19, 2021
@paulbalandan paulbalandan deleted the no-code-separators branch July 19, 2021 13:08
element-code pushed a commit to element-code/CodeIgniter4 that referenced this pull request Aug 2, 2021
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.

4 participants