elvis_style (elvis_core v4.1.1)

View Source

Summary

Functions

Types

atom_naming_convention_config/0

-type atom_naming_convention_config() ::
          #{ignore => [ignorable()], regex => string(), enclosed_atoms => same | string()}.

behaviour_spelling_config/0

-type behaviour_spelling_config() :: #{ignore => [ignorable()], spelling => behaviour | behavior}.

binary_part/0

-type binary_part() :: {Start :: non_neg_integer(), Length :: integer()}.

consistent_variable_casing_config/0

-type consistent_variable_casing_config() :: #{ignore => [ignorable()]}.

data_type/0

-type data_type() :: record | map | tuple.

dont_repeat_yourself_config/0

-type dont_repeat_yourself_config() :: #{ignore => [ignorable()], min_complexity => non_neg_integer()}.

empty_rule_config/0

-type empty_rule_config() :: #{ignore => [ignorable()]}.

function_naming_convention_config/0

-type function_naming_convention_config() :: #{ignore => [ignorable()], regex => string()}.

function_spec/0

-type function_spec() :: {module(), atom(), arity()} | {module(), atom()}.

god_modules_config/0

-type god_modules_config() :: #{ignore => [ignorable()], limit => integer()}.

ignorable/0

-type ignorable() :: module() | {module(), atom()} | {module(), atom(), arity()}.

macro_names_config/0

-type macro_names_config() :: #{ignore => [ignorable()], regex => string()}.

max_anonymous_function_arity_config/0

-type max_anonymous_function_arity_config() :: #{max_arity => non_neg_integer()}.

max_function_arity_config/0

-type max_function_arity_config() ::
          #{max_arity => non_neg_integer(), non_exported_max_arity => pos_integer()}.

max_function_length_config/0

-type max_function_length_config() ::
          #{ignore => [ignorable()],
            max_length => non_neg_integer(),
            count_comments => boolean(),
            count_whitespace => boolean()}.

max_module_length_config/0

-type max_module_length_config() ::
          #{ignore => [ignorable()],
            count_comments => boolean(),
            count_whitespace => boolean(),
            max_length => integer()}.

module_naming_convention_config/0

-type module_naming_convention_config() :: #{ignore => [ignorable()], regex => string()}.

nesting_level_config/0

-type nesting_level_config() :: #{ignore => [ignorable()], level => integer()}.

no_author_config/0

-type no_author_config() :: #{ignore => [ignorable()]}.

no_block_expressions_config/0

-type no_block_expressions_config() :: #{ignore => [ignorable()]}.

no_call_config/0

-type no_call_config() :: #{ignore => [ignorable()], no_call_functions => [function_spec()]}.

no_catch_expressions_config/0

-type no_catch_expressions_config() :: #{ignore => [ignorable()]}.

no_common_caveats_call_config/0

-type no_common_caveats_call_config() ::
          #{ignore => [ignorable()], caveat_functions => [function_spec()]}.

no_debug_call_config/0

-type no_debug_call_config() :: #{ignore => [ignorable()], debug_functions => [function_spec()]}.

no_import_config/0

-type no_import_config() :: #{ignore => [ignorable()]}.

no_init_lists_config/0

-type no_init_lists_config() :: #{behaviours => [atom()]}.

no_macros_config/0

-type no_macros_config() :: #{allow => [atom()], ignore => [ignorable()]}.

no_match_in_condition_config/0

-type no_match_in_condition_config() :: #{ignore => [ignorable()]}.

no_nested_hrls_config/0

-type no_nested_hrls_config() :: #{allow => [atom()], ignore => [ignorable()]}.

no_operation_on_same_value_config/0

-type no_operation_on_same_value_config() :: #{operations := [atom()]}.

no_single_clause_case_config/0

-type no_single_clause_case_config() :: #{ignore => [ignorable()]}.

no_single_match_maybe_config/0

-type no_single_match_maybe_config() :: #{ignore => [ignorable()]}.

no_space_after_pound_config/0

-type no_space_after_pound_config() :: #{ignore => [ignorable()]}.

no_space_config/0

-type no_space_config() :: #{ignore => [ignorable()], rules => [{right | left, string()}]}.

no_specs_config/0

-type no_specs_config() :: #{allow => [atom()], ignore => [ignorable()]}.

no_types_config/0

-type no_types_config() :: #{allow => [atom()], ignore => [ignorable()]}.

numeric_format_config/0

-type numeric_format_config() ::
          #{ignore => [ignorable()],
            regex => string(),
            int_regex => same | string(),
            float_regex => same | string()}.

operator_spaces_config/0

-type operator_spaces_config() :: #{ignore => [ignorable()], rules => [{right | left, string()}]}.

param_pattern_matching_config/0

-type param_pattern_matching_config() :: #{ignore => [ignorable()], side => left | right}.

private_data_type_config/0

-type private_data_type_config() :: #{apply_to => [data_type()]}.

variable_naming_convention_config/0

-type variable_naming_convention_config() :: #{ignore => [ignorable()], regex => string()}.

Functions

always_shortcircuit(Config, Target, RuleConfig)

-spec always_shortcircuit(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                             [elvis_result:item()].

atom_naming_convention(Config, Target, RuleConfig)

behaviour_spelling(Config, Target, RuleConfig)

consistent_generic_type(Config, Target, RuleConfig)

-spec consistent_generic_type(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                                 [elvis_result:item()].

consistent_variable_casing(Config, Target, RuleConfig)

default(RuleName)

-spec default(RuleName :: atom()) -> DefaultRuleConfig :: #{atom() := term()}.

dont_repeat_yourself(Config, Target, RuleConfig)

export_used_types(Config, Target, RuleConfig)

-spec export_used_types(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                           [elvis_result:item()].

function_naming_convention(Config, Target, RuleConfig)

god_modules(Config, Target, RuleConfig)

invalid_dynamic_call(Config, Target, RuleConfig)

-spec invalid_dynamic_call(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                              [elvis_result:item()].

macro_names(Config, Target, RuleConfig)

max_anonymous_function_arity(Config, Target, RuleConfig)

max_function_arity(Config, Target, RuleConfig)

max_function_clause_length(Config, Target, RuleConfig)

-spec max_function_clause_length(elvis_config:config(), elvis_file:file(), max_function_length_config()) ->
                                    [elvis_result:item()].

max_function_length(Config, Target, RuleConfig)

max_module_length(Config, Target, RuleConfig)

module_naming_convention(Config, Target, RuleConfig)

ms_transform_included(Config, Target, RuleConfig)

-spec ms_transform_included(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                               [elvis_result:item()].

nesting_level(Config, Target, RuleConfig)

no_author(Config, Target, RuleConfig)

no_behavior_info(Config, Target, RuleConfig)

no_block_expressions(Config, Target, RuleConfig)

no_boolean_in_comparison(Config, Target, RuleConfig)

-spec no_boolean_in_comparison(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                                  [elvis_result:item()].

no_call(Config, Target, RuleConfig)

no_catch_expressions(Config, Target, RuleConfig)

no_common_caveats_call(Config, Target, RuleConfig)

no_debug_call(Config, Target, RuleConfig)

no_dollar_space(Config, Target, RuleConfig)

no_if_expression(Config, Target, RuleConfig)

no_import(Config, Target, RuleConfig)

no_init_lists(Config, Target, RuleConfig)

no_macros(ElvisConfig, RuleTarget, RuleConfig)

no_match_in_condition(Config, Target, RuleConfig)

no_nested_hrls(ElvisConfig, RuleTarget, RuleConfig)

no_nested_try_catch(Config, Target, RuleConfig)

-spec no_nested_try_catch(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                             [elvis_result:item()].

no_operation_on_same_value(Config, Target, RuleConfig)

no_receive_without_timeout(Config, Target, RuleConfig)

-spec no_receive_without_timeout(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                                    [elvis_result:item()].

no_single_clause_case(Config, Target, RuleConfig)

no_single_match_maybe(Config, Target, RuleConfig)

no_space(Config, Target, RuleConfig)

no_space_after_pound(Config, Target, RuleConfig)

no_spec_with_records(Config, Target, RuleConfig)

-spec no_spec_with_records(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                              [elvis_result:item()].

no_specs(ElvisConfig, RuleTarget, RuleConfig)

no_successive_maps(Config, Target, RuleConfig)

-spec no_successive_maps(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                            [elvis_result:item()].

no_throw(Config, Target, RuleConfig)

no_types(ElvisConfig, RuleTarget, RuleConfig)

numeric_format(Config, Target, RuleConfig)

operator_spaces(Config, Target, RuleConfig)

option(OptionName, RuleConfig, Rule)

-spec option(OptionName, RuleConfig, Rule) -> OptionValue
                when
                    OptionName :: atom(),
                    RuleConfig :: elvis_core:rule_config(),
                    Rule :: atom(),
                    OptionValue :: term().

param_pattern_matching(Config, Target, RuleConfig)

private_data_types(Config, Target, RuleConfig)

state_record_and_type(Config, Target, RuleConfig)

-spec state_record_and_type(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                               [elvis_result:item()].

used_ignored_variable(Config, Target, RuleConfig)

-spec used_ignored_variable(elvis_config:config(), elvis_file:file(), empty_rule_config()) ->
                               [elvis_result:item()].

variable_naming_convention(Config, Target, RuleConfig)