Open nyaray opened 5 years ago
@nyaray I played around with this idea on a branch: 0c30d9c
Is this what you had in mind?
So, I wrote my example comment incorrectly 🤦♂ ... It was supposed to be # TODO: (#54) adjust the flux capacitor properly
.
As the TODO above gives me credo issues I guess the proposal remains, but I should probably clarify my request as it seems the logic got inverted somewhere after I had the idea and spilled my word soup of a description.
When I prefix the description of the TODO (# TODO: <PREFIX HERE> description bla bla bla
), I'd like to be able to make the TODO check skip lines where the description prefix is present. Those TODOs are plans/observations for a later task, which I want credo to ignore.
I think what I am requesting is an exclusion pattern, but that might already be possible, no?
Environment
Credo version (
mix credo -v
): 1.0.5Erlang/Elixir version (
elixir -v
):Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace] Elixir 1.8.1 (compiled with Erlang/OTP 21)
Operating system: macOS 10.14.5
What were you trying to do?
Keeping TODOs out is good, but sometimes you find things and want to reference an issue, for that it would be nice to be able to pre-approve lines using a regex.
For example, I'm working on issue 23 and see something that would be great to change when dealing with issue 54, so I write:
# (#54) TODO: adjust the flux capacitor properly
Expected outcome
No warning for the described TODO comment.
Actual outcome
I get a warning for the described TODO comment.