Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #27

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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