Skip to content

Commit

Permalink
Enable ameba linter
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga committed Dec 23, 2017
1 parent 16fc35e commit 366c317
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This configuration file was generated by `ameba --gen-config`
# on 2017-12-23 21:39:50 +0200 using Ameba version 0.3.0.
# The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base.

# Problems found: 3
# Run `ameba --only LargeNumbers` for details
LargeNumbers:
Description: Disallows usage of large numbers without underscore
IntMinDigits: 5
Enabled: true
Excluded:
- spec/controllers/oauth_controller_spec.cr
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ language: crystal
services: postgresql
before_script:
- psql -c "create database $DATABASE_NAME;" -U postgres
install:
- crystal deps
script:
- crystal spec
- bin/ameba
3 changes: 3 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ development_dependencies:
webmock:
github: manastech/webmock.cr
branch: master

ameba:
github: veelenga/ameba
2 changes: 1 addition & 1 deletion spec/support/factories.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "../../src/models/**"

def user(**params)
attributes = {
:uid => (rand() * 10000).to_i.to_s,
:uid => (rand() * 10_000).to_i.to_s,
:login => "johndoe",
:provider => "github",
} of Symbol | String => String | JSON::Type
Expand Down

0 comments on commit 366c317

Please sign in to comment.