cookstyle 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/CHANGELOG.md +10 -0
- data/README.md +3 -8
- data/config/cookstyle.yml +8 -1
- data/lib/cookstyle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b87c184f04afdc46a542bac5e656a77d3da55e0
|
4
|
+
data.tar.gz: c7f9c0de9d62096c4d2a95de77cbedbb120498d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19eb2775c35e80f6babc7e174fbfc2db4e5e5045943af2be3bcf8e1f91679c52af4388cea18f3755ec53e8b19aff5a3be0a5a9b5d628713ac8ac9da2404ffa1d
|
7
|
+
data.tar.gz: 2cae0ec829a8aa010756d30ec1ac188dbddad0cdc52c249c897b33e211e0512329695948b4fabeaa047ce2ae488d5bafec397b572f92393ab226e93709d7bd2d
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Cookstyle Changelog
|
2
2
|
|
3
|
+
## 1.4.0 (2017-05-30)
|
4
|
+
|
5
|
+
- Our configuration of Lint/AmbiguousRegexpLiteral now ignores files in the test dir even if you run Cookstyle against a chef-repo directory instead of individual cookbook directories.
|
6
|
+
- We now explicitly set TargetRubyVersion to 2.0, as Ruby 2.0 shipped in older Chef 12 releases.
|
7
|
+
|
8
|
+
### Newly Disabled Cops:
|
9
|
+
|
10
|
+
- BlockLength which completes Cookstyle ignoring length in cookbooks.
|
11
|
+
- Performance/Casecmp which resulted in confusing code.
|
12
|
+
|
3
13
|
## 1.3.1 (2017-04-17)
|
4
14
|
|
5
15
|
### Newly Disabled Cops:
|
data/README.md
CHANGED
@@ -2,13 +2,9 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/cookstyle.svg)](https://badge.fury.io/rb/cookstyle) [![Build Status](https://travis-ci.org/chef/cookstyle.svg?branch=master)](https://travis-ci.org/chef/cookstyle)
|
4
4
|
|
5
|
-
Cookstyle is a set of opinions about ruby code that are specific to
|
6
|
-
cookbooks. Running both cookstyle and rubocop on the same codebase will
|
7
|
-
result, by design, in changes being applied and then removed. Needless
|
8
|
-
to say you should *not* use both tools on the same cookbook.
|
5
|
+
Cookstyle is a set of opinions about ruby code that are specific to cookbooks. Running both cookstyle and rubocop on the same codebase will result, by design, in changes being applied and then removed. Needless to say you should _not_ use both tools on the same cookbook.
|
9
6
|
|
10
|
-
Cookstyle is included in the ChefDK, and can be used from the command
|
11
|
-
line by running `cookstyle`.
|
7
|
+
Cookstyle is included in the ChefDK, and can be used from the command line by running `cookstyle`.
|
12
8
|
|
13
9
|
The active ruleset is in the [config/cookstyle.yml](https://github.com/chef/cookstyle/blob/master/config/cookstyle.yml) file. Changes to the rule set must be accompanied by arguments and code demonstrating why the change should be made, and in most cases we would expect the author of the change to help with updating the core community cookbooks.
|
14
10
|
|
@@ -34,8 +30,7 @@ When editing the `cookstyle_base.yml` becomes too much of a PITA, it may be time
|
|
34
30
|
|
35
31
|
## Installation
|
36
32
|
|
37
|
-
Cookstyle is included in the [ChefDK](https://downloads.chef.io/chefdk). If you choose not to use ChefDK,
|
38
|
-
you can still install Cookstyle manually using the instructions below.
|
33
|
+
Cookstyle is included in the [ChefDK](https://downloads.chef.io/chefdk). If you choose not to use ChefDK, you can still install Cookstyle manually using the instructions below.
|
39
34
|
|
40
35
|
Add this line to your application's Gemfile:
|
41
36
|
|
data/config/cookstyle.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
+
TargetRubyVersion: 2.0
|
2
3
|
Exclude:
|
3
4
|
- vendor/**/*
|
4
5
|
- Guardfile
|
@@ -25,6 +26,8 @@ LineLength:
|
|
25
26
|
Enabled: false
|
26
27
|
MethodLength:
|
27
28
|
Enabled: false
|
29
|
+
BlockLength:
|
30
|
+
Enabled: false
|
28
31
|
Metrics/AbcSize:
|
29
32
|
Enabled: false
|
30
33
|
Metrics/ModuleLength:
|
@@ -48,7 +51,7 @@ Style/NumericLiterals:
|
|
48
51
|
# This often triggers no matter what you do with inspec/serverspec matchers
|
49
52
|
Lint/AmbiguousRegexpLiteral:
|
50
53
|
Exclude:
|
51
|
-
- 'test/**/*'
|
54
|
+
- '**/*/test/**/*'
|
52
55
|
|
53
56
|
# some names are not ascii and this prevents copyright comments
|
54
57
|
Style/AsciiComments:
|
@@ -110,3 +113,7 @@ Bundler/OrderedGems:
|
|
110
113
|
# There's no reason to have a gem listed twice
|
111
114
|
Bundler/DuplicatedGem:
|
112
115
|
Enabled: true
|
116
|
+
|
117
|
+
# This results in very confusing code to read with little perf benefit
|
118
|
+
Performance/Casecmp:
|
119
|
+
Enabled: false
|
data/lib/cookstyle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookstyle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|