-
Notifications
You must be signed in to change notification settings - Fork 428
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
MongooseIM 2.0.1 #1160
MongooseIM 2.0.1 #1160
Conversation
It was just Rows before
Muc light loop fix
Feature/cassandra schema converter
|
||
|
||
%% The lists are guaranteed to be non-empty and of equal | ||
%% length by make_error_message/4 | ||
-spec make_error_el([amp_error()],[amp_any_rule()]) -> #xmlel{}. | ||
-spec make_error_el([amp_error()], [amp_any_rule()]) -> #xmlel{}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
The spec in line 101 uses a record, please define a type for the record and use that instead.
@@ -567,7 +566,7 @@ mnesia_change_nodename(FromString, ToString, Source, Target) -> | |||
fun | |||
({schema, db_nodes, Nodes}, Acc) -> | |||
io:format(" +++ db_nodes ~p~n", [Nodes]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Remove the debug call to io:format/2 on line 568.
@@ -119,7 +119,7 @@ rule_to_xmlel(#amp_rule{condition=C, value=V, action=A}) -> | |||
rule_to_xmlel(#amp_invalid_rule{condition=C, value=V, action=A}) -> | |||
#xmlel{name = <<"rule">>, | |||
attrs = [{<<"condition">>, C}, | |||
{<<"value">>,V}, | |||
{<<"value">>, V}, | |||
{<<"action">>, A}]}. | |||
|
|||
-spec strip_amp_el(#xmlel{}) -> #xmlel{}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
The spec in line 125 uses a record, please define a type for the record and use that instead.
@@ -120,19 +120,19 @@ scan_and_parse(RemainingText, CurrFilename, CurrLine, RevForms, MacroDict, Inclu | |||
{ok, Form} = erl_parse:parse_form(Toks), | |||
scan_and_parse(NRemainingText, CurrFilename, NLine, [Form | RevForms], MacroDict, IncludeSearchPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 121 is too long: scan_and_parse(NRemainingText, CurrFilename, NLine, [Form | RevForms], MacroDict, IncludeSearchPath);.
@@ -119,7 +119,7 @@ listmech(Host) -> | |||
[{'==', '$2', plain}]; | |||
scram -> | |||
[{'/=', '$2', digest}]; | |||
{'EXIT',{undef,[{Module,store_type,[]} | _]}} -> | |||
{'EXIT', {undef, [{Module, store_type, []} | _]}} -> | |||
?WARNING_MSG("~p doesn't implement the function store_type/0", [Module]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 123 is too long: ?WARNING_MSG("~p doesn't implement the function store_type/0", [Module]),.
{include, NLine, NRemainingText, IncludeFilename} -> | ||
IncludeFileRemainingTextents = read_include_file(IncludeFilename, IncludeSearchPath), | ||
%%io:format("include file ~p contents: ~n~p~nRemainingText = ~p~n", [IncludeFilename,IncludeFileRemainingTextents, RemainingText]), | ||
%%io:format("include file ~p contents: ~n~p~nRemainingText = ~p~n", [IncludeFilename, IncludeFileRemainingTextents, RemainingText]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 126 is too long: %%io:format("include file
p contents:nRemainingText =nppn", [IncludeFilename, IncludeFileRemainingTextents, RemainingText]),.
{macro, dict:store(Name, macro_params_body_def(Macro, []), MacroDict)} | ||
end; | ||
pre_proc([{'-',_}, {atom,_,include}, {'(',_}, {string,_,Filename}, {')',_}, {dot,_}], _MacroDict) -> | ||
pre_proc([{'-', _}, {atom, _, include}, {'(', _}, {string, _, Filename}, {')', _}, {dot, _}], _MacroDict) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 204 is too long: pre_proc([{'-', _}, {atom, _, include}, {'(', _}, {string, _, Filename}, {')', _}, {dot, _}], _MacroDict) ->.
%% Modify the FILE macro to reflect the filename | ||
%%IncludeMacroDict = dict:store('FILE', {[],IncludeFilename}, MacroDict), | ||
%%IncludeMacroDict = dict:store('FILE', {[], IncludeFilename}, MacroDict), | ||
IncludeMacroDict = MacroDict, | ||
|
||
%% Process the header file (inc. any nested header files) | ||
{RevIncludeForms, IncludedMacroDict} = scan_and_parse(IncludeFileRemainingTextents, IncludeFilename, 1, [], IncludeMacroDict, IncludeSearchPath), | ||
%io:format("include file results = ~p~n", [R]), | ||
%% Restore the FILE macro in the NEW MacroDict (so we keep any macros defined in the header file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 134 is too long: %% Restore the FILE macro in the NEW MacroDict (so we keep any macros defined in the header file).
@@ -402,11 +401,11 @@ restore_mnesia(Path) -> | |||
String = io_lib:format("Can't restore backup from ~p at node ~p: ~p", | |||
[filename:absname(Path), node(), Reason]), | |||
{cannot_restore, String}; | |||
{aborted,{no_exists,Table}} -> | |||
{aborted, {no_exists, Table}} -> | |||
String = io_lib:format("Can't restore backup from ~p at node ~p: Table ~p does not exist.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 405 is too long: String = io_lib:format("Can't restore backup from ~p at node ~p: Table ~p does not exist.",.
%% Modify the FILE macro to reflect the filename | ||
%%IncludeMacroDict = dict:store('FILE', {[],IncludeFilename}, MacroDict), | ||
%%IncludeMacroDict = dict:store('FILE', {[], IncludeFilename}, MacroDict), | ||
IncludeMacroDict = MacroDict, | ||
|
||
%% Process the header file (inc. any nested header files) | ||
{RevIncludeForms, IncludedMacroDict} = scan_and_parse(IncludeFileRemainingTextents, IncludeFilename, 1, [], IncludeMacroDict, IncludeSearchPath), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 132 is too long: {RevIncludeForms, IncludedMacroDict} = scan_and_parse(IncludeFileRemainingTextents, IncludeFilename, 1, [], IncludeMacroDict, IncludeSearchPath),.
@@ -567,7 +566,7 @@ mnesia_change_nodename(FromString, ToString, Source, Target) -> | |||
fun | |||
({schema, db_nodes, Nodes}, Acc) -> | |||
io:format(" +++ db_nodes ~p~n", [Nodes]), | |||
{[{schema, db_nodes, lists:map(Switch,Nodes)}], Acc}; | |||
{[{schema, db_nodes, lists:map(Switch, Nodes)}], Acc}; | |||
({schema, version, Version}, Acc) -> | |||
io:format(" +++ version: ~p~n", [Version]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Remove the debug call to io:format/2 on line 571.
subst_macros_rev(Toks, MacroDict, [{integer,LineNum,LineNum}] ++ RevOutToks); | ||
subst_macros_rev([{'?',_}, {_,_,Name}, {'(',_} = Paren | Toks], MacroDict, RevOutToks) -> | ||
subst_macros_rev(Toks, MacroDict, [{integer, LineNum, LineNum}] ++ RevOutToks); | ||
subst_macros_rev([{'?', _}, {_, _, Name}, {'(', _} = Paren | Toks], MacroDict, RevOutToks) -> | ||
case dict:fetch(Name, MacroDict) of | ||
{[], MacroValue} -> | ||
%% This macro does not have any vars, so ignore the fact that the invocation is followed by "(...stuff" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 245 is too long: %% This macro does not have any vars, so ignore the fact that the invocation is followed by "(...stuff".
@@ -175,7 +175,7 @@ scanner(Text, Line, MacroDict) -> | |||
is_only_comments(Text) -> is_only_comments(Text, not_in_comment). | |||
|
|||
%% @private | |||
-spec is_only_comments('eof' | string(),'in_comment' | 'not_in_comment') -> boolean(). | |||
-spec is_only_comments('eof' | string(), 'in_comment' | 'not_in_comment') -> boolean(). | |||
is_only_comments([], _) -> true; | |||
is_only_comments([$ |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment | |||
is_only_comments([$\t |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 181 is too long: is_only_comments([$\t |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment.
%% @private | ||
-spec pre_proc([{_,_} | {_,_,_}], macro_dict()) -> {'include',_} | {'macro', macro_dict()} | {'tokens',[any()]}. | ||
pre_proc([{'-',_},{atom,_,define},{'(',_},{_,_,Name}|DefToks],MacroDict) -> | ||
-spec pre_proc([{_, _} | {_, _, _}], macro_dict()) -> {'include', _} | {'macro', macro_dict()} | {'tokens', [any()]}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 195 is too long: -spec pre_proc([{_, } | {, _, _}], macro_dict()) -> {'include', _} | {'macro', macro_dict()} | {'tokens', [any()]}..
@@ -120,19 +120,19 @@ scan_and_parse(RemainingText, CurrFilename, CurrLine, RevForms, MacroDict, Inclu | |||
{ok, Form} = erl_parse:parse_form(Toks), | |||
scan_and_parse(NRemainingText, CurrFilename, NLine, [Form | RevForms], MacroDict, IncludeSearchPath); | |||
{macro, NLine, NRemainingText, NMacroDict} -> | |||
scan_and_parse(NRemainingText, CurrFilename, NLine, RevForms,NMacroDict, IncludeSearchPath); | |||
scan_and_parse(NRemainingText, CurrFilename, NLine, RevForms, NMacroDict, IncludeSearchPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 123 is too long: scan_and_parse(NRemainingText, CurrFilename, NLine, RevForms, NMacroDict, IncludeSearchPath);.
@@ -161,8 +161,8 @@ parse_rules(Stanza) -> | |||
|
|||
-spec parse_rule(#xmlel{}) -> amp_rule() | amp_invalid_rule(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
The spec in line 162 uses a record, please define a type for the record and use that instead.
@@ -175,7 +175,7 @@ scanner(Text, Line, MacroDict) -> | |||
is_only_comments(Text) -> is_only_comments(Text, not_in_comment). | |||
|
|||
%% @private | |||
-spec is_only_comments('eof' | string(),'in_comment' | 'not_in_comment') -> boolean(). | |||
-spec is_only_comments('eof' | string(), 'in_comment' | 'not_in_comment') -> boolean(). | |||
is_only_comments([], _) -> true; | |||
is_only_comments([$ |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 180 is too long: is_only_comments([$ |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment.
This release includes:
Special thanks to our contributors: @kenstir, @sstrigler, @igors, @bernardd, @msantos
This release repo history