Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 3 new ruby cops & remove duplicate disables #756

Merged
merged 2 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/cookstyle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
# frozen_string_literal: true

$LOAD_PATH.unshift File.join(__dir__, %w(.. lib))
Expand Down
27 changes: 12 additions & 15 deletions config/cookstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2361,21 +2361,6 @@ Lint/UselessSetterCall:
Lint/Void:
Enabled: true

##### Additional rules we enable/disable over the rubocop 0.37 rules ago #####

Layout/AlignParameters:
Enabled: false
Style/Encoding:
Enabled: false
Style/Alias:
Enabled: false
Layout/SpaceBeforeFirstArg:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/DoubleNegation:
Enabled: false

# file names don't matter in cookbooks
Naming/FileName:
Enabled: false
Expand Down Expand Up @@ -2712,3 +2697,15 @@ Style/RedundantFileExtensionInRequire:
# more code you don't need
Style/RedundantCondition:
Enabled: true

# Ruby 2 makes these pointless
Style/Encoding:
Enabled: true

# Use __dir__ to simplify things
Style/Dir:
Enabled: true

# Use __FILE__ or __dir__ to simplify expand_paths
Style/ExpandPathArguments:
Enabled: true
3 changes: 1 addition & 2 deletions cookstyle.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cookstyle/version'

Expand Down