Skip to content

Commit ab2a2c9

Browse files
relaxing types in erl_parse and erl_syntax
Summary: - erl_parse and erl_syntax are inconsistent about types - this results in a bunch of ignores in our code - making offenders `dynamic()` to reduce the noise - eliminates 20 ignores Reviewed By: kren1 Differential Revision: D68490666 fbshipit-source-id: 4c2e0d079751c94447e149bc6a306398ac53bd53
1 parent 70e758e commit ab2a2c9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

finer_taint/src/finer_taint_compiler.erl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ instrument_with_sinks(Forms, Options) ->
190190
get_source([]) ->
191191
error(taint_unknown_module);
192192
get_source([{attribute, _, file, {Source, _}} | _]) ->
193-
% eqwalizer:ignore - This should be cast_dynamic, but can't import eqwalizer module here because parse transform
194193
Source;
195194
get_source([_ | Rest]) ->
196195
get_source(Rest).
@@ -202,7 +201,6 @@ get_module([_ | Rest]) -> get_module(Rest).
202201

203202
-spec has_ms_transform(forms()) -> boolean().
204203
has_ms_transform([{attribute, _, file, {Path, _Line}} | Tail]) ->
205-
% eqwalizer:ignore - assume `Path :: unicode:chardata()`
206204
case string:find(Path, "ms_transform.hrl") of
207205
nomatch -> has_ms_transform(Tail);
208206
_ -> true
@@ -223,7 +221,6 @@ rewrite(Rest = [{attribute, _, finer_taint_compiled, _} | _], _, Acc) ->
223221
rewrite([], _, Acc) ->
224222
%% all input has been processed
225223
Forms = lists:reverse(Acc),
226-
% eqwalizer:ignore This should be cast_dynamic, but can't import eqwalizer module here because parse transform
227224
[
228225
erl_parse:map_anno(fun(Anno) -> erl_anno:set_generated(true, Anno) end, Form)
229226
|| Form <- Forms
@@ -1130,7 +1127,6 @@ compile_forms(Forms) ->
11301127
-spec load_forms(binary()) -> {module(), forms()}.
11311128
load_forms(Binary) ->
11321129
{ok, {Module, [{abstract_code, {_, Forms}} | _]}} = beam_lib:chunks(Binary, [abstract_code, compile_info]),
1133-
% eqwalizer:ignore optimistic use of beam_lib API
11341130
{Module, Forms}.
11351131

11361132
-spec ms_transform(forms(), options()) -> forms().

0 commit comments

Comments
 (0)