Skip to content

Commit

Permalink
Merge pull request #2763 from Ana06/exit_cop
Browse files Browse the repository at this point in the history
[ci] Enable Rails/Exit Rubocop cop
  • Loading branch information
bgeuken committed Mar 14, 2017
2 parents 9de7590 + f86dfe8 commit d895945
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 145 deletions.
5 changes: 5 additions & 0 deletions src/api/.rubocop.yml
Expand Up @@ -252,6 +252,11 @@ Performance/StringReplacement:

Rails:
Enabled: true

# Enforces that 'exit' calls are not used.
Rails/Exit:
Exclude:
- 'lib/memory_dumper.rb'

# Use `find_by` instead `where.first` and `where.take`
Rails/FindBy:
Expand Down
12 changes: 0 additions & 12 deletions src/api/.rubocop_todo.yml
Expand Up @@ -111,16 +111,6 @@ Performance/CompareWithBlock:
Rails/DynamicFindBy:
Enabled: false

# Offense count: 4
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
Rails/Exit:
Exclude:
- 'lib/**/*.rake'
- 'app/jobs/consistency_check.rb'
- 'config/deploy.rb'
- 'lib/memory_dumper.rb'

# Offense count: 126
Rails/FilePath:
Enabled: false
Expand Down Expand Up @@ -626,7 +616,6 @@ Style/PercentLiteralDelimiters:
- 'app/controllers/source_controller.rb'
- 'app/controllers/webui/monitor_controller.rb'
- 'app/models/package.rb'
- 'config/deploy.rb'
- 'config/initializers/hoptoad.rb'
- 'lib/engines/base.rb'
- 'script/start_test_backend'
Expand Down Expand Up @@ -854,7 +843,6 @@ Style/StringLiteralsInInterpolation:
- 'app/models/binary_release.rb'
- 'app/models/full_text_search.rb'
- 'app/models/issue_tracker.rb'
- 'config/deploy.rb'
- 'db/checker.rb'
- 'lib/activexml/transport.rb'
- 'lib/tasks/cleanup_sessions.rake'
Expand Down
3 changes: 0 additions & 3 deletions src/api/Capfile

This file was deleted.

2 changes: 1 addition & 1 deletion src/api/app/jobs/consistency_check.rb
Expand Up @@ -48,7 +48,7 @@ def check_project(fix = nil)
init
if ENV['project'].blank?
puts "Please specify the project with 'project=MyProject' on CLI"
exit(1)
return
end
begin
project = Project.get_by_name(ENV['project'])
Expand Down
129 changes: 0 additions & 129 deletions src/api/config/deploy.rb

This file was deleted.

0 comments on commit d895945

Please sign in to comment.