View Source elvis_utils (elvis_core v3.2.5)
Summary
Functions
Takes a binary that holds source code and applies Fun to each line. Fun takes 2 or 3 arguments (the line as a binary, the line number and the optional supplied Args) and returns 'no_result' or {'ok', Result}.
Checks each line calling fun and providing the previous and next lines based on the context tuple {Before, After}.
Takes a binary that holds source code and applies Fun to each line. Fun takes 3 arguments (the line as a binary, the line number and the supplied Args) and returns 'no_result' or {'ok', Result}.
This is defined so that it can be mocked for tests.
Takes a line, a character and a count, returning the indentation level invalid if the number of character is not a multiple of count.
Types
Functions
-spec check_lines(binary(), fun(), term()) -> [elvis_result:item()].
Takes a binary that holds source code and applies Fun to each line. Fun takes 2 or 3 arguments (the line as a binary, the line number and the optional supplied Args) and returns 'no_result' or {'ok', Result}.
-spec check_lines_with_context(binary(), fun(), term(), line_content()) -> [elvis_result:item()].
Checks each line calling fun and providing the previous and next lines based on the context tuple {Before, After}.
-spec check_nodes(ktn_code:tree_node(), fun(), [term()]) -> [elvis_result:item()].
Takes a binary that holds source code and applies Fun to each line. Fun takes 3 arguments (the line as a binary, the line number and the supplied Args) and returns 'no_result' or {'ok', Result}.
This is defined so that it can be mocked for tests.
-spec error(string()) -> ok.
-spec error_prn(string()) -> ok.
Takes a line, a character and a count, returning the indentation level invalid if the number of character is not a multiple of count.
-spec info(string()) -> ok.
-spec notice(string()) -> ok.