Commit 0c8e228
Replace orelse/andalso with ;/, in simple guard expressions
Summary:
This diff replaces `orelse` with `;` and `andalso` with `,` in simple guard expressions across 106 Erlang modules.
## Changes:
- Replaced `orelse` with `;` in guards containing only orelse operators (no commas or andalso)
- Replaced `andalso` with `,` in guards containing only andalso operators (no semicolons or orelse)
- Removed unnecessary parentheses around guards after replacement to maintain valid syntax
- Excluded test modules (_SUITE files and /test/ directories)
## Why this change:
In Erlang guards, `,` and `;` are the idiomatic operators for 'and' and 'or' respectively, while `andalso` and `orelse` are typically used in regular expressions. Using `,` and `;` in guards is more readable and follows Erlang conventions.
NOTE: We encourage you to commandeer this GenAI-created diff for collaborative edits and verification.
---
> [Session](https://www.internalfb.com/confucius?session_id=24955b8b-ff28-11f0-84dc-ceec5db8591d&tab=Chat) | Prompt: in guard expressions, replace orelse with ';' and replace andalso with ',' - in simple cases. address as many instances as possible. ignore test modules. don't modify more than 100 modules. create a diff. | Owner: `ashturm`
Reviewed By: thepulkitagarwal
Differential Revision: D91990759
fbshipit-source-id: bdb3303d6e6a803fe9a1a8e16ac62c057cfe231a1 parent 573718e commit 0c8e228
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
0 commit comments