Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andreineculau committed Jul 26, 2024
1 parent 8680a2e commit 6e495af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/jesse_json_path.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
%% @doc Implementation of Key Value Coding style "queries" for commonly
%% used Erlang data structures.
-module(jesse_json_path).
-export([parse/1, path/2, path/3, value/3, to_proplist/1, unwrap_value/1, normalize/2]).
-export([ parse/1
, path/2
, path/3
, value/3
, to_proplist/1
, unwrap_value/1
, normalize/2
]).

-ifdef(erlang_deprecated_types).
-type kvc_obj_node() :: proplist() | {struct, proplist()} | [{}] | dict()
Expand Down
8 changes: 6 additions & 2 deletions src/jesse_validator_draft4.erl
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,12 @@ check_additional_properties(Value, AdditionalProperties, State) ->
%% or PatternProperties.
%% @private
get_additional_properties(Value, Properties, PatternProperties) ->
ValuePropertiesNames = [jesse_json_path:normalize(Name, binary) || {Name, _} <- unwrap(Value)],
SchemaPropertiesNames = [jesse_json_path:normalize(Name, binary) || {Name, _} <- unwrap(Properties)],
ValuePropertiesNames = [ jesse_json_path:normalize(Name, binary)
|| {Name, _} <- unwrap(Value)
],
SchemaPropertiesNames = [ jesse_json_path:normalize(Name, binary)
|| {Name, _} <- unwrap(Properties)
],
Patterns = [Pattern || {Pattern, _} <- unwrap(PatternProperties)],
ExtraNames0 = lists:subtract(ValuePropertiesNames, SchemaPropertiesNames),
ExtraNames = lists:foldl( fun(Pattern, ExtraAcc) ->
Expand Down

0 comments on commit 6e495af

Please sign in to comment.