Skip to content

Commit 0c8e228

Browse files
Alexander Shturmmeta-codesync[bot]
authored andcommitted
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: bdb3303d6e6a803fe9a1a8e16ac62c057cfe231a
1 parent 573718e commit 0c8e228

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

finer_taint/src/taint_abstract_machine.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ propagate(
829829
propagate(
830830
{deconstruct_pattern, {{cons}, _Loc}},
831831
State = #taint_am_state{stack = [H = {TaintValueType, _} | Stack]}
832-
) when TaintValueType =:= taint orelse TaintValueType =:= notaint ->
832+
) when TaintValueType =:= taint; TaintValueType =:= notaint ->
833833
State#taint_am_state{stack = [H, H] ++ Stack};
834834
%% Deconstructs a binary pattern. BinPattern is a list of Size/Tsl expressions
835835
%% that can be used to infer the segment size. Most of the heavy lifting

0 commit comments

Comments
 (0)