rubycritic 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cf713113af44f9c325495284ffc4e6845688c8e
4
- data.tar.gz: 508db135f5cf808c7b012ee19dc5d82db0872e82
3
+ metadata.gz: 1bbd53ca30b1e2cae94b44246ca2df4f1ef200bb
4
+ data.tar.gz: 584e3a45c1c3ae04c261366b706699c5087effea
5
5
  SHA512:
6
- metadata.gz: 6ef195a2c4913ab047af9227575e96295d6ba988931d8586faf4ada2fb026b4d9898b824c9bd87f4f9c1469199bedb37f645d7710efd4cb5efdab8732df947c7
7
- data.tar.gz: 2d13ac2809f5e5f7d01c38dd18a69c593bc3afcc994a386a50b1a479eeda185b9ecd5c63cbc7e2752c62ffd2bb36560daf8be879a04a7eb90ffb0fe5164328d2
6
+ metadata.gz: 9a452882ed7dc3cb9bd8ab6817650a4f475ea06cc465ff7c9d9290495578be1ad76c04eb31cd66155813a88d14ad28c44c43280f2bcef7d0a5a521d8e8abd97c
7
+ data.tar.gz: 2b2f54e2f3f40363bdd9f628e0f0fa0ff742dde3ad217aa69f0d25e2bb0424bc3a8119a37937e42c49fbf197604c5e4ae54e1c8d0fb3459f90662461165f9609
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .idea/
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+ sudo: false
1
2
  language: ruby
2
3
 
3
4
  rvm:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.2.0 / 2015-11-20
2
+
3
+ * [CHANGE] Use `Reeks` default configuration loading.
4
+
1
5
  # 2.1.0 / 2015-11-11
2
6
 
3
7
  * [CHANGE] Bump flay dependency to 2.6.1.
data/CONTRIBUTING.md CHANGED
@@ -32,8 +32,8 @@ Each commit should do one thing and one thing only. For example, all whitespace
32
32
 
33
33
  9. [Create a Pull Request] and send it to be merged with the master branch.
34
34
 
35
- 10. After your code is reviewed, [hide the sausage making]. Squash, split and reorder commits if necessary (`git rebase -i`).
36
- For a more in-depth look at interactive rebasing, be sure to check [how to rewrite history].
35
+ 10. After your code is reviewed, [hide the sausage making]. We follow the "one commit per pull request" [principle](http://ndlib.github.io/practices/one-commit-per-pull-request/) since this allows for a clean git history, easy handling of features and convenient rollbacks when things go wrong. Or in one sentence: You can have as many commits as you want in your pull request, but after the final review and before the merge you need to squash all of those in one single commit.
36
+ For a more in-depth look at interactive rebasing, be sure to check [how to rewrite history] as well.
37
37
 
38
38
  Improving the Documentation
39
39
  ---------------------------
data/README.md CHANGED
@@ -100,6 +100,14 @@ $ rubycritic --help
100
100
  | `--deduplicate-symlinks` | De-duplicate symlinks based on their final target |
101
101
  | `--suppress-ratings` | Suppress letter ratings |
102
102
 
103
+ Analyzer Configuration
104
+ -------------------------
105
+
106
+ * `Reek`: `RubyCritic` just uses `Reek`'s default [configuration loading mechanism](https://github.com/troessner/reek#configuration-file).
107
+
108
+ This section is work in progress at the moment and is missing the other analyzers that RubyCritic supports.
109
+ You can expect this to be updated soon.
110
+
103
111
  Alternative Usage Methods
104
112
  -------------------------
105
113
 
@@ -131,6 +139,17 @@ Similarly, Pull Requests that improve the look and feel of the gem, that tweak t
131
139
 
132
140
  See RubyCritic's [contributing guidelines](CONTRIBUTING.md) about how to proceed.
133
141
 
142
+ Contributors / Core Team
143
+ ---------------
144
+
145
+ `RubyCritics` initial author was [Guilherme Simões](https://github.com/guilhermesimoes).
146
+
147
+ The current core team consists of:
148
+
149
+ * [Nuno Silva](https://github.com/Onumis)
150
+ * [Lucas Mazza](https://github.com/lucasmazza)
151
+ * [Timo Rößner](https://github.com/troessner)
152
+
134
153
  Credits
135
154
  -------
136
155
 
@@ -1,15 +1,6 @@
1
1
  require "reek"
2
- require "reek/configuration/app_configuration"
3
- require "ostruct"
4
2
 
5
3
  module Rubycritic
6
-
7
4
  class Reek < ::Reek::Examiner
8
- DEFAULT_CONFIG_FILE = File.expand_path("../config.reek", __FILE__)
9
-
10
- def initialize(pathname)
11
- config = ::Reek::Configuration::AppConfiguration.from_path(DEFAULT_CONFIG_FILE)
12
- super(pathname, [], :configuration => config)
13
- end
14
5
  end
15
6
  end
@@ -1,3 +1,3 @@
1
1
  module Rubycritic
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -11,25 +11,15 @@ describe Rubycritic::Analyser::ReekSmells do
11
11
  end
12
12
 
13
13
  it "detects its smells" do
14
- @analysed_module.smells.length.must_equal 1
14
+ @analysed_module.smells.length.must_equal 2
15
15
  end
16
16
 
17
17
  it "creates smells with messages" do
18
- smell = @analysed_module.smells.first
19
- smell.message.must_equal "has boolean parameter 'reek'"
20
- end
21
- end
22
-
23
- context "when analysing a file with smells ignored in config.reek" do
24
- before do
25
- pathname = Pathname.new("test/samples/reek/not_smelly.rb")
26
- @analysed_module = AnalysedModuleDouble.new(:pathname => pathname, :smells => [])
27
- analysed_modules = [@analysed_module]
28
- Rubycritic::Analyser::ReekSmells.new(analysed_modules).run
29
- end
18
+ first_smell = @analysed_module.smells.first
19
+ first_smell.message.must_equal "has no descriptive comment"
30
20
 
31
- it "does not detect those smells" do
32
- @analysed_module.smells.must_be_empty
21
+ last_smell = @analysed_module.smells.last
22
+ last_smell.message.must_equal "has boolean parameter 'reek'"
33
23
  end
34
24
  end
35
25
  end
@@ -3,3 +3,10 @@ class Theon
3
3
  reek
4
4
  end
5
5
  end
6
+
7
+ # Reek should report
8
+ # [1]:Theon has no descriptive comment (IrresponsibleModule)
9
+ # [2]:Theon#reeks? has boolean parameter 'reek' (BooleanParameter)
10
+ # This comment is below the module because otherwise Reek will interpret this
11
+ # as a comment describing the module which would thus prevent
12
+ # IrresponsibleModule from being reported.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubycritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Simoes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus
@@ -180,7 +180,6 @@ files:
180
180
  - lib/rubycritic/analysers/churn.rb
181
181
  - lib/rubycritic/analysers/complexity.rb
182
182
  - lib/rubycritic/analysers/helpers/ast_node.rb
183
- - lib/rubycritic/analysers/helpers/config.reek
184
183
  - lib/rubycritic/analysers/helpers/flay.rb
185
184
  - lib/rubycritic/analysers/helpers/flog.rb
186
185
  - lib/rubycritic/analysers/helpers/methods_counter.rb
@@ -301,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
300
  version: '0'
302
301
  requirements: []
303
302
  rubyforge_project:
304
- rubygems_version: 2.4.5
303
+ rubygems_version: 2.4.6
305
304
  signing_key:
306
305
  specification_version: 4
307
306
  summary: RubyCritic is a Ruby code quality reporter
@@ -1,26 +0,0 @@
1
- ---
2
- Attribute:
3
- enabled: false
4
- DuplicateMethodCall:
5
- max_calls: 2
6
- IrresponsibleModule:
7
- enabled: false
8
- NestedIterators:
9
- max_allowed_nesting: 2
10
- TooManyStatements:
11
- enabled: false
12
- UncommunicativeMethodName:
13
- reject:
14
- - !ruby/regexp /^[a-z]$/
15
- - !ruby/regexp /[0-9]$/
16
- UncommunicativeParameterName:
17
- reject:
18
- - !ruby/regexp /^.$/
19
- - !ruby/regexp /[0-9]$/
20
- - !ruby/regexp /^_/
21
- UncommunicativeVariableName:
22
- reject:
23
- - !ruby/regexp /^.$/
24
- - !ruby/regexp /[0-9]$/
25
- UtilityFunction:
26
- enabled: false