This repository was archived by the owner on Aug 31, 2023. It is now read-only.
New rule: needless-foreach, or ban-foreach #4331
Closed
jpike88
started this conversation in
Suggestions
Replies: 1 comment 10 replies
-
Any pointer to justify it? |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Foreach is an anti pattern as it creates more difficult to read code. There's no good reason to use it. It should be banned, and part of the Rome recommended ruleset.
Beta Was this translation helpful? Give feedback.
All reactions