Skip to content

Commit def4510

Browse files
committed
run init here and fix offenses
1 parent 3536dbf commit def4510

18 files changed

+352
-54
lines changed

.hound.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ruby:
2+
enabled: true
3+
config_file: .rubocop.yml
4+
5+
coffee_script:
6+
enabled: true

.rubocop.hound_defaults.yml

+265
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
#
2+
# NOTE: * DO NOT EDIT THIS FILE! *
3+
#
4+
# This file should match the config/style_guides/ruby.yml from the
5+
# thoughtbot/hound project
6+
7+
AllCops:
8+
Exclude:
9+
- db/schema.rb
10+
11+
AccessorMethodName:
12+
Enabled: false
13+
14+
ActionFilter:
15+
Enabled: false
16+
17+
Alias:
18+
Enabled: false
19+
20+
ArrayJoin:
21+
Enabled: false
22+
23+
AsciiComments:
24+
Enabled: false
25+
26+
AsciiIdentifiers:
27+
Enabled: false
28+
29+
Attr:
30+
Enabled: false
31+
32+
BlockNesting:
33+
Enabled: false
34+
35+
CaseEquality:
36+
Enabled: false
37+
38+
CharacterLiteral:
39+
Enabled: false
40+
41+
ClassAndModuleChildren:
42+
Enabled: false
43+
44+
ClassLength:
45+
Enabled: false
46+
47+
ClassVars:
48+
Enabled: false
49+
50+
CollectionMethods:
51+
PreferredMethods:
52+
find: detect
53+
reduce: inject
54+
collect: map
55+
find_all: select
56+
57+
ColonMethodCall:
58+
Enabled: false
59+
60+
CommentAnnotation:
61+
Enabled: false
62+
63+
CyclomaticComplexity:
64+
Enabled: false
65+
66+
Delegate:
67+
Enabled: false
68+
69+
DeprecatedHashMethods:
70+
Enabled: false
71+
72+
Documentation:
73+
Enabled: false
74+
75+
DotPosition:
76+
EnforcedStyle: trailing
77+
78+
DoubleNegation:
79+
Enabled: false
80+
81+
EachWithObject:
82+
Enabled: false
83+
84+
EmptyLiteral:
85+
Enabled: false
86+
87+
Encoding:
88+
Enabled: false
89+
90+
EvenOdd:
91+
Enabled: false
92+
93+
FileName:
94+
Enabled: false
95+
96+
FlipFlop:
97+
Enabled: false
98+
99+
FormatString:
100+
Enabled: false
101+
102+
GlobalVars:
103+
Enabled: false
104+
105+
GuardClause:
106+
Enabled: false
107+
108+
IfUnlessModifier:
109+
Enabled: false
110+
111+
IfWithSemicolon:
112+
Enabled: false
113+
114+
InlineComment:
115+
Enabled: false
116+
117+
Lambda:
118+
Enabled: false
119+
120+
LambdaCall:
121+
Enabled: false
122+
123+
LineEndConcatenation:
124+
Enabled: false
125+
126+
LineLength:
127+
Max: 80
128+
129+
MethodLength:
130+
Enabled: false
131+
132+
ModuleFunction:
133+
Enabled: false
134+
135+
NegatedIf:
136+
Enabled: false
137+
138+
NegatedWhile:
139+
Enabled: false
140+
141+
Next:
142+
Enabled: false
143+
144+
NilComparison:
145+
Enabled: false
146+
147+
Not:
148+
Enabled: false
149+
150+
NumericLiterals:
151+
Enabled: false
152+
153+
OneLineConditional:
154+
Enabled: false
155+
156+
OpMethod:
157+
Enabled: false
158+
159+
ParameterLists:
160+
Enabled: false
161+
162+
PercentLiteralDelimiters:
163+
Enabled: false
164+
165+
PerlBackrefs:
166+
Enabled: false
167+
168+
PredicateName:
169+
NamePrefixBlacklist:
170+
- is_
171+
172+
Proc:
173+
Enabled: false
174+
175+
RaiseArgs:
176+
Enabled: false
177+
178+
RegexpLiteral:
179+
Enabled: false
180+
181+
SelfAssignment:
182+
Enabled: false
183+
184+
SingleLineBlockParams:
185+
Enabled: false
186+
187+
SingleLineMethods:
188+
Enabled: false
189+
190+
SignalException:
191+
Enabled: false
192+
193+
SpecialGlobalVars:
194+
Enabled: false
195+
196+
StringLiterals:
197+
EnforcedStyle: double_quotes
198+
199+
VariableInterpolation:
200+
Enabled: false
201+
202+
TrailingComma:
203+
Enabled: false
204+
205+
TrivialAccessors:
206+
Enabled: false
207+
208+
VariableInterpolation:
209+
Enabled: false
210+
211+
WhenThen:
212+
Enabled: false
213+
214+
WhileUntilModifier:
215+
Enabled: false
216+
217+
WordArray:
218+
Enabled: false
219+
220+
# Lint
221+
222+
AmbiguousOperator:
223+
Enabled: false
224+
225+
AmbiguousRegexpLiteral:
226+
Enabled: false
227+
228+
AssignmentInCondition:
229+
Enabled: false
230+
231+
ConditionPosition:
232+
Enabled: false
233+
234+
DeprecatedClassMethods:
235+
Enabled: false
236+
237+
ElseLayout:
238+
Enabled: false
239+
240+
HandleExceptions:
241+
Enabled: false
242+
243+
InvalidCharacterLiteral:
244+
Enabled: false
245+
246+
LiteralInCondition:
247+
Enabled: false
248+
249+
LiteralInInterpolation:
250+
Enabled: false
251+
252+
Loop:
253+
Enabled: false
254+
255+
ParenthesesAsGroupedExpression:
256+
Enabled: false
257+
258+
RequireParentheses:
259+
Enabled: false
260+
261+
UnderscorePrefixedVariableName:
262+
Enabled: false
263+
264+
Void:
265+
Enabled: false

.rubocop.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
inherit_from:
2+
- .rubocop.hound_defaults.yml
3+
- .rubocop_todo.yml
4+
5+
# Files you want to exclude
6+
AllCops:
7+
Exclude:
8+
- db/schema.rb
9+
- Gemfile
10+
- Rakefile
11+
12+
# Rails cops (so we don't need to run with -R option)
13+
AllCops:
14+
RunRailsCops: true
15+
16+
# TODO: put your overrides here:
17+
18+
# StringLiterals:
19+
# EnforcedStyle: single_quotes

.rubocop_todo.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This configuration was generated by `rubocop --auto-gen-config`
2+
# on 2014-12-08 16:58:15 +0100 using RuboCop version 0.25.0.
3+
# The point is for the user to remove these configuration records
4+
# one by one as the offenses are removed from the code base.
5+
# Note that changes in the inspected code, or installation of new
6+
# versions of RuboCop, may require this file to be generated again.
7+
8+
# Offense count: 17
9+
# Configuration parameters: AllowURI.
10+
Metrics/LineLength:
11+
Max: 113

Gemfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
source 'https://rubygems.org'
1+
source "https://rubygems.org"
22

33
gemspec
44

55
group :development do
6-
gem 'rspec', '~> 3.1'
7-
gem 'guard-rspec'
6+
gem "rspec", "~> 3.1"
7+
gem "guard-rspec"
88
end

Guardfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
## Uncomment to clear the screen before every task
88
# clearing :on
99

10-
11-
1210
# Note: The cmd option is now required due to the increasing number of ways
1311
# rspec may be run, below are examples of the most common uses.
1412
# * bundler: 'bundle exec rspec'
@@ -33,10 +31,10 @@ guard :rspec, cmd: "bundle exec rspec" do
3331

3432
hound = OpenStruct.new
3533
hound.libspec = ->(m) { "spec/lib/hound/tools/#{m}_spec.rb" }
36-
hound.libspecs = ->(m) { m.map {|name| hound.libspec.(name) } }
34+
hound.libspecs = ->(m) { m.map { |name| hound.libspec.(name) } }
3735
hound.template_r = ->(m) { /^#{Regexp.quote("lib/hound/tools/templates/_#{m}")}$/ }
3836

39-
watch('lib/hound/tools/template.rb') { hound.libspecs.(%w(cli hound_yml hound_defaults)) }
40-
watch(hound.template_r.('.hound.yml')) { hound.libspecs.(%w(cli hound_yml)) }
41-
watch(hound.template_r.('.rubocop.hound_defaults.yml')) { hound.libspecs.(%w(cli hound_defaults)) }
37+
watch("lib/hound/tools/template.rb") { hound.libspecs.(%w(cli hound_yml hound_defaults)) }
38+
watch(hound.template_r.(".hound.yml")) { hound.libspecs.(%w(cli hound_yml)) }
39+
watch(hound.template_r.(".rubocop.hound_defaults.yml")) { hound.libspecs.(%w(cli hound_defaults)) }
4240
end

bin/hound-tools

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env ruby
22

3-
require 'hound/tools/cli'
3+
require "hound/tools/cli"
44

55
Hound::Tools::Cli.start

hound-tools.gemspec

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
2+
lib = File.expand_path("../lib", __FILE__)
33
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'hound/tools/version'
4+
require "hound/tools/version"
55

66
Gem::Specification.new do |spec|
77
spec.name = "hound-tools"
88
spec.version = Hound::Tools::VERSION
99
spec.authors = ["Cezary Baginski"]
1010
spec.email = ["[email protected]"]
11-
spec.summary = %q{Tools for configuring and using HoundCI}
12-
spec.description = %q{Matches your project config to give the same errors as HoundCi}
11+
spec.summary = "Tools for configuring and using HoundCI"
12+
spec.description = "Matches your project config to give the same errors as HoundCi"
1313
spec.homepage = ""
1414
spec.license = "MIT"
1515

lib/hound/tools/cli.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
require 'thor'
2-
require 'yaml'
1+
require "thor"
2+
require "yaml"
33

4-
require 'hound/tools/hound_yml'
5-
require 'hound/tools/hound_defaults'
6-
require 'hound/tools/rubocop_yml'
4+
require "hound/tools/hound_yml"
5+
require "hound/tools/hound_defaults"
6+
require "hound/tools/rubocop_yml"
77

8-
require 'hound/tools/runner'
8+
require "hound/tools/runner"
99

1010
module Hound
1111
module Tools
@@ -65,7 +65,7 @@ def init
6565

6666
# TODO: help setup Rakefile?
6767

68-
Kernel.system('bundle exec rubocop --auto-gen')
68+
Kernel.system("bundle exec rubocop --auto-gen")
6969
$stdout.puts INSTRUCTIONS
7070
end
7171

0 commit comments

Comments
 (0)