Skip to content

Commit

Permalink
Update src/elvis_style.erl
Browse files Browse the repository at this point in the history
Co-authored-by: Brujo Benavides <[email protected]>
  • Loading branch information
bormilan and elbrujohalcon authored Dec 5, 2024
1 parent 40edae8 commit db6aa53
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/elvis_style.erl
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,18 @@ errors_for_function_names(Regex, ForbiddenRegex, [FunctionName | RemainingFuncNa
Result = elvis_result:new(item, Msg, Info, 1),
[Result | errors_for_function_names(Regex, ForbiddenRegex, RemainingFuncNames)];
{match, _} ->
case ForbiddenRegex =/= undefined
andalso re:run(FunctionNameStr, ForbiddenRegex, [unicode])
of
case ForbiddenRegex of
undefined -> errors_for_function_names(Regex, ForbiddenRegex, RemainingFuncNames);
ForbiddenRegex ->
case re:run(FunctionNameStr, ForbiddenRegex, [unicode]) of
{match, _} ->
Msg = ?FORBIDDEN_FUNCTION_NAMING_CONVENTION_MSG,
Info = [FunctionNameStr, Regex],
Result = elvis_result:new(item, Msg, Info, 1),
[Result | errors_for_function_names(Regex, ForbiddenRegex, RemainingFuncNames)];
nomatch ->
errors_for_function_names(Regex, ForbiddenRegex, RemainingFuncNames);
false ->
errors_for_function_names(Regex, ForbiddenRegex, RemainingFuncNames)
end
end
end.

Expand Down

0 comments on commit db6aa53

Please sign in to comment.