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 Style/Encoding cop #94

Merged
merged 1 commit into from
Jul 14, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Style/FrozenStringLiteralComment:
Enabled: true
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"

# Specify your gem's dependencies in chefstyle.gemspec
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "bundler/gem_tasks"

upstream = Gem::Specification.find_by_name("rubocop")
Expand Down
3 changes: 1 addition & 2 deletions bin/chefstyle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-

# frozen_string_literal: true
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w{.. lib})

require "chefstyle"
Expand Down
2 changes: 1 addition & 1 deletion chefstyle.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coding: utf-8
# frozen_string_literal: true
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "chefstyle/version"
Expand Down
10 changes: 5 additions & 5 deletions config/chefstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,15 @@ Style/WhileUntilModifier:
Style/WordArray:
Enabled: true

# we are ruby > 2.0 only so we can remove encoding comments for utf-8
Style/Encoding:
Enabled: true

#
# Disabled Style
#

# FIXME: we need to enable this
# reduces memory usage, but isn't a simple autocorrect so we need to do this one project at a time
Style/FrozenStringLiteralComment:
Enabled: false

Expand Down Expand Up @@ -529,10 +533,6 @@ Style/FormatString:
Style/IfUnlessModifier:
Enabled: false

# we are ruby > 2.0 only so can disable the Encoding cop
Style/Encoding:
Enabled: false

# Dan is -1 on this one: https://github.com/chef/chef/pull/4526#issuecomment-179950045
Layout/IndentFirstHashElement:
Enabled: false
Expand Down
1 change: 1 addition & 0 deletions lib/chefstyle.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require_relative "chefstyle/version"

# ensure the desired target version of RuboCop is gem activated
Expand Down
5 changes: 3 additions & 2 deletions lib/chefstyle/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
module Chefstyle
VERSION = "1.1.3".freeze
RUBOCOP_VERSION = "0.87.1".freeze
VERSION = "1.1.3"
RUBOCOP_VERSION = "0.87.1"
end