Skip to content

Commit

Permalink
Fix reported ameba issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Dec 27, 2023
1 parent 4f2e2c0 commit c5f7400
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions spec/ameba/ast/visitors/flow_expression_visitor_spec.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
require "../../../spec_helper"

module Ameba::AST
source = Source.new ""

describe FlowExpressionVisitor do
it "creates an expression for return" do
rule = FlowExpressionRule.new
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Ameba
# Dummy Rule which does nothing.
class DummyRule < Rule::Base
properties do
description : String = "Dummy rule that does nothing."
description "Dummy rule that does nothing."
dummy true
end

Expand Down Expand Up @@ -92,7 +92,7 @@ module Ameba

class PerfRule < Rule::Performance::Base
properties do
description : String = "Sample performance rule"
description "Sample performance rule"
end

def test(source)
Expand Down
2 changes: 1 addition & 1 deletion src/ameba/rule/lint/typos.cr
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Ameba::Rule::Lint
class Typos < Base
properties do
description "Reports typos found in source files"
bin_path : String? = nil
bin_path : String? = nil # ameba:disable Lint/UselessAssign
fail_on_error false
end

Expand Down
4 changes: 2 additions & 2 deletions src/ameba/rule/style/verbose_block.cr
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ module Ameba::Rule::Style
exclude_operators true
exclude_setters false

max_line_length : Int32? = nil # 100
max_length : Int32? = 50
max_line_length : Int32? = nil # ameba:disable Lint/UselessAssign
max_length : Int32? = 50 # ameba:disable Lint/UselessAssign
end

MSG = "Use short block notation instead: `%s`"
Expand Down

0 comments on commit c5f7400

Please sign in to comment.