Skip to content

Commit

Permalink
Dedup TodosNeedTickets
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Nov 28, 2023
1 parent 729e43a commit 6afa266
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/blitz_credo_checks/todos_need_tickets.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ defmodule BlitzCredoChecks.TodosNeedTickets do
[] ->
tags
|> Stream.flat_map(&TagHelper.tags(source_file, &1, true))
|> Stream.uniq_by(&elem(&1, 0))
|> Enum.map(&issue_for(issue_meta, &1))

# We found ticket urls so ignore every todo in file
Expand Down
2 changes: 1 addition & 1 deletion test/blitz_credo_checks/todos_need_tickets_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule BlitzCredoChecks.TodosNeedTicketsTest do
"""
|> to_source_file()
|> TodosNeedTickets.run(ticket_url: "https://linear.app/blitz/issue/")
|> assert_issues()
|> assert_issue()
end

test "accepts todos with a ticket attached" do
Expand Down

0 comments on commit 6afa266

Please sign in to comment.