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

Exception raised for TODO check #7

Closed
iwarshak opened this issue Nov 18, 2015 · 1 comment
Closed

Exception raised for TODO check #7

iwarshak opened this issue Nov 18, 2015 · 1 comment

Comments

@iwarshak
Copy link

First of all, this is very slick. Thanks for doing this. I noticed an error is raised with some of my todos.

Fails:
Repo.preload(:comments)# TODO blah blah

Works:
Repo.preload(:comments) # TODO blah blah

I am pretty sure it is just the lack of space after the # that is causing the issue

Credo: 0.1.4

Exception:

Checking 44 source files ...
** (EXIT from #PID<0.46.0>) an exception was raised:
    ** (Regex.CompileError) unmatched parentheses at position 2
        (elixir) lib/regex.ex:141: Regex.compile!/2
        lib/credo/source_file.ex:35: Credo.SourceFile.column/3
        lib/credo/check/design/tag_todo.ex:24: Credo.Check.Design.TagTODO.format_issue/2
        (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
        (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
        (elixir) lib/enum.ex:1043: Enum.map/2
        (elixir) lib/enum.ex:836: anonymous fn/3 in Enum.flat_map/2
        (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3

22:14:05.238 [error] Task #PID<0.184.0> started from #PID<0.46.0> terminating
** (Regex.CompileError) unmatched parentheses at position 2
    (elixir) lib/regex.ex:141: Regex.compile!/2
    lib/credo/source_file.ex:35: Credo.SourceFile.column/3
    lib/credo/check/design/tag_todo.ex:24: Credo.Check.Design.TagTODO.format_issue/2
    (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir) lib/enum.ex:1043: Enum.map/2
    (elixir) lib/enum.ex:836: anonymous fn/3 in Enum.flat_map/2
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
Function: #Function<6.103509261/0 in Credo.Check.Runner.run/2>
    Args: []

22:14:05.245 [error] GenServer Credo.Supervisor terminating
** (Regex.CompileError) unmatched parentheses at position 2
    (elixir) lib/regex.ex:141: Regex.compile!/2
    lib/credo/source_file.ex:35: Credo.SourceFile.column/3
    lib/credo/check/design/tag_todo.ex:24: Credo.Check.Design.TagTODO.format_issue/2
    (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir) lib/enum.ex:1043: Enum.map/2
    (elixir) lib/enum.ex:836: anonymous fn/3 in Enum.flat_map/2
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
Last message: {:EXIT, #PID<0.46.0>, {%Regex.CompileError{message: "unmatched parentheses at position 2"}, [{Regex, :compile!, 2, [file: 'lib/regex.ex', line: 141]}, {Credo.SourceFile, :column, 3, [file: 'lib/credo/source_file.ex', line: 35]}, {Credo.Check.Design.TagTODO, :format_issue, 2, [file: 'lib/credo/check/design/tag_todo.ex', line: 24]}, {Enum, :"-map/2-fun-0-", 3, [file: 'lib/enum.ex', line: 1043]}, {Enum, :"-reduce/3-lists^foldl/2-0-", 3, [file: 'lib/enum.ex', line: 1387]}, {Enum, :map, 2, [file: 'lib/enum.ex', line: 1043]}, {Enum, :"-flat_map/2-fun-1-", 3, [file: 'lib/enum.ex', line: 836]}, {Enum, :"-reduce/3-lists^foldl/2-0-", 3, [file: 'lib/enum.ex', line: 1387]}]}}
State: {:state, {:local, Credo.Supervisor}, :one_for_one, [{:child, #PID<0.166.0>, Credo.Service.SourceFileCodeOnly, {Credo.Service.SourceFileCodeOnly, :start_link, []}, :permanent, 5000, :worker, [Credo.Service.SourceFileCodeOnly]}, {:child, #PID<0.165.0>, Credo.Service.SourceFileWithoutStringAndSigils, {Credo.Service.SourceFileWithoutStringAndSigils, :start_link, []}, :permanent, 5000, :worker, [Credo.Service.SourceFileWithoutStringAndSigils]}], :undefined, 3, 5, [], Supervisor.Default, {:ok, {{:one_for_one, 3, 5}, [{Credo.Service.SourceFileWithoutStringAndSigils, {Credo.Service.SourceFileWithoutStringAndSigils, :start_link, []}, :permanent, 5000, :worker, [Credo.Service.SourceFileWithoutStringAndSigils]}, {Credo.Service.SourceFileCodeOnly, {Credo.Service.SourceFileCodeOnly, :start_link, []}, :permanent, 5000, :worker, [Credo.Service.SourceFileCodeOnly]}]}}}```
rrrene added a commit that referenced this issue Nov 18, 2015
@rrrene rrrene closed this as completed in 7b8146c Nov 18, 2015
@rrrene
Copy link
Owner

rrrene commented Nov 18, 2015

Hi, thx for the bug report!

It is fixed in v0.1.6 which just went "live" :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants