Skip to content

Commit

Permalink
Merge pull request #27 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
michaelklishin authored Jun 15, 2022
2 parents 733ae3f + 83c36ff commit d8050fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cuttlefish_conf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ generate_element(MappingRecord) ->
IncDef = cuttlefish_mapping:include_default(MappingRecord),
[Datatype|_] = cuttlefish_mapping:datatype(MappingRecord),
%% level != basic OR hidden == true: leave out of generated .conf file
%% commeneted $val: insert into .conf file, but commented out with $val
%% commented $val: insert into .conf file, but commented out with $val
%% include_default $val: substitute '$name' or whatever in the key for $val
%% e.g. {include_default, "internal"}
%% listener.http.$name -> listener.http.internal
Expand Down
8 changes: 4 additions & 4 deletions src/cuttlefish_generator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ map_validate(Schema, Conf) ->
-spec apply_mappings(cuttlefish_schema:schema(), cuttlefish_conf:conf()) ->
{[proplists:property()], [string()]}.
apply_mappings({Translations, Mappings, _Validators}, Conf) ->
%% This fold handles 1:1 mappings, that have no cooresponding translations
%% The accumlator is the app.config proplist that we start building from
%% This fold handles 1:1 mappings, that have no corresponding translations
%% The accumulator is the app.config proplist that we start building from
%% these 1:1 mappings, hence the return "DirectMappings".
%% It also builds a list of "TranslationsToDrop". It's basically saying that
%% if a user didn't actually configure this setting in the .conf file and
Expand Down Expand Up @@ -486,8 +486,8 @@ value_sub(Var, Value, Conf, History) when is_list(Value) ->
SubVal ->
%% Do a sub-subsitution, in case the substituted
%% value contains substitutions itself. Do this as
%% its own seperate recursion so that circular
%% subtitutions can be detected.
%% its own separate recursion so that circular
%% substitutions can be detected.
case value_sub(NextVar, SubVal, Conf, [Var|History]) of
{error, _} = Error ->
Error;
Expand Down
4 changes: 2 additions & 2 deletions src/cuttlefish_mapping.erl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ parse(X) ->
%% That something is usually a simple replace, unless the proplist in
%% the raw mapping contains the atom 'merge'.
%%
%% This fuction assumes it's run as part of a foldl over new schema elements
%% This function assumes it's run as part of a foldl over new schema elements
%% in which case, there's only ever one instance of a key in the list
%% so keyreplace works fine.
-spec parse_and_merge(
Expand Down Expand Up @@ -280,7 +280,7 @@ mapping_test() ->
?assertEqual(["valid.the.impailer"], Record#mapping.validators),
?assertEqual(true, Record#mapping.hidden),

%% funciton tests
%% function tests
?assertEqual(["conf","key"], variable(Record)),
?assertEqual("default value", default(Record)),
?assertEqual("erlang.key", mapping(Record)),
Expand Down
2 changes: 1 addition & 1 deletion test/riak.schema
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
{commented, "/tmp/erlserver.pem"}
]}.

%% @doc if you need a seperate keyfile for handoff
%% @doc if you need a separate keyfile for handoff
{mapping, "handoff.ssl.keyfile", "riak_core.handoff_ssl_options.keyfile", []}.

%% @doc DTrace support
Expand Down

0 comments on commit d8050fe

Please sign in to comment.