Refactor ExplainFormatter

This commit is contained in:
Sijawusz Pur Rahnama 2022-11-25 05:02:37 +01:00
parent f9b05a309e
commit 33ef9c6293
3 changed files with 41 additions and 22 deletions

View file

@ -59,7 +59,7 @@ module Ameba
source = Source.new "a = 42", "source.cr"
output = explanation(source)
output.should contain "DETAILED DESCRIPTION"
output.should contain "TO BE DONE..."
output.should contain "Rule extended description"
end
it "writes nothing if location not found" do

View file

@ -24,6 +24,7 @@ module Ameba
end
end
# Rule extended description
class ErrorRule < Rule::Base
properties do
description "Always adds an error at 1:1"