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

[shopsys] added BlankLineBeforeStatementFixer for ensuring empty line before statements #2128

Merged
merged 4 commits into from May 19, 2023

Conversation

TomasLudvik
Copy link
Member

Q A
Description, reason for the PR This PR adds fixer to ensure empty line before: break, continue, declare, do, for, foreach, if, return, switch, throw, try, while and yield
New feature Yes
BC breaks No
Fixes issues ...
Have you read and signed our License Agreement for contributions? Yes

@TomasLudvik TomasLudvik added the DX & Refactoring Requests for DX improvements and refactorings label Nov 19, 2020
@TomasLudvik TomasLudvik force-pushed the tl-add-empty-line-before-statements branch 3 times, most recently from b32b6bb to 9c309de Compare November 19, 2020 13:08
@TomasLudvik TomasLudvik added this to the SSFW 9.1.0 milestone Nov 19, 2020
Copy link
Member

@grossmannmartin grossmannmartin left a comment

Choose a reason for hiding this comment

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

rules should not be in packages/product-feed-heureka/easy-coding-standard.yml or it's a mistake?

Copy link
Member

@grossmannmartin grossmannmartin left a comment

Choose a reason for hiding this comment

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

👍 awesome

@sonarcloud
Copy link

sonarcloud bot commented Nov 19, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.9% 0.9% Duplication

sslt
sslt previously approved these changes Nov 19, 2020
@sslt sslt dismissed their stale review November 19, 2020 14:40

There is rather emotional discussion, whether this is the best approach in it's current form. After the dust settles, we will continue...

@sslt sslt modified the milestones: SSFW 9.1.0, SSFW 9.1.1 Dec 18, 2020
@sslt sslt modified the milestones: SSFW 9.1.1, SSFW 9.1.0, SSFW 9.2.0 Jan 8, 2021
@TomasLudvik TomasLudvik removed this from the SSFW 9.2.0 milestone Apr 21, 2023
@TomasLudvik TomasLudvik force-pushed the tl-add-empty-line-before-statements branch from cf251a5 to b340f52 Compare May 10, 2023 21:22
…nsuring empty lines before statements

applied for:
- 'break'
- 'continue'
- 'declare'
- 'do'
- 'for'
- 'foreach'
- 'if'
- 'return'
- 'switch'
- 'throw'
- 'try'
- 'while'
- 'yield'
@TomasLudvik TomasLudvik force-pushed the tl-add-empty-line-before-statements branch from b340f52 to 81439ff Compare May 10, 2023 21:22
Copy link
Member

@grossmannmartin grossmannmartin left a comment

Choose a reason for hiding this comment

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

nice work. Can you please check the failing build?
Maybe we should make this change blocked by replacing FunctionLengthSniff with one that ignores whitespace. Just a thought

…e with slevomat sniffs

- property per class limit sniff is not supported in any other library so it has been removed
- slevomat/coding-standars has been updated to newest version
- unused private elements sniff has been removed as same check is done by PHPStan
@TomasLudvik
Copy link
Member Author

nice work. Can you please check the failing build?
Maybe we should make this change blocked by replacing FunctionLengthSniff with one that ignores whitespace. Just a thought

I have replaced it

…mmenting\InlineDocCommentDeclarationSniff.InvalidFormat"
@TomasLudvik TomasLudvik force-pushed the tl-add-empty-line-before-statements branch from 2fec059 to c2a512d Compare May 17, 2023 07:19
@TomasLudvik TomasLudvik merged commit 5336c26 into master May 19, 2023
9 checks passed
@TomasLudvik TomasLudvik deleted the tl-add-empty-line-before-statements branch May 19, 2023 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX & Refactoring Requests for DX improvements and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants