Skip to content

Fix code style using ameba linter #465

@faustinoaq

Description

@faustinoaq

Description

 ../ameba/bin/ameba 
Inspecting 166 files.

.........................F...F...............................................................F...................................F.............F....F.................                                                           

spec/amber/extensions/number_extension_spec.cr:6:8
LargeNumbers: Large numbers should be written with underscores: -5.542_3

spec/amber/router/router_spec.cr:129:9
VariableNames: Var name should be underscore-cased: route_a, not routeA

spec/amber/router/router_spec.cr:130:9
VariableNames: Var name should be underscore-cased: route_b, not routeB

spec/amber/router/router_spec.cr:131:9
VariableNames: Var name should be underscore-cased: route_c, not routeC

spec/amber/router/router_spec.cr:132:9
VariableNames: Var name should be underscore-cased: route_d, not routeD

spec/amber/router/router_spec.cr:134:20
VariableNames: Var name should be underscore-cased: route_a, not routeA

spec/amber/router/router_spec.cr:135:20
VariableNames: Var name should be underscore-cased: route_b, not routeB

spec/amber/router/router_spec.cr:136:20
VariableNames: Var name should be underscore-cased: route_c, not routeC

spec/amber/router/router_spec.cr:137:20
VariableNames: Var name should be underscore-cased: route_d, not routeD

spec/amber/router/router_spec.cr:140:80
VariableNames: Var name should be underscore-cased: route_a, not routeA

spec/amber/router/router_spec.cr:144:78
VariableNames: Var name should be underscore-cased: route_b, not routeB

spec/amber/router/router_spec.cr:148:79
VariableNames: Var name should be underscore-cased: route_c, not routeC

spec/amber/router/router_spec.cr:152:82
VariableNames: Var name should be underscore-cased: route_d, not routeD

src/amber/cli/commands/exec.cr:36:9
UnlessElse: Favour if over unless with else

src/amber/support/message_verifier.cr:13:5
RedundantBegin: Redundant `begin` block detected

src/amber/router/pipe/error.cr:7:7
RedundantBegin: Redundant `begin` block detected

src/amber/router/pipe/cors.cr:16:7
RedundantBegin: Redundant `begin` block detected

Finished in 104.38 milliseconds 

166 inspected, 17 failures.

Steps to Reproduce

  1. Clone amber framework repo
  2. Execute ameba tool
  3. See output

Expected behavior: No errors

Actual behavior: 17 failures.

Reproduces how often: always

Versions

v0.5.0

Additional Information

Ameba is a static code analysis tool for the Crystal language. It enforces a consistent Crystal code style, also catches code smells and wrong code constructions

by @veelenga

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions