Skip to content

Commit 7c2095f

Browse files
committedMay 21, 2013
Fix tailor warnings.
1 parent 995eb2f commit 7c2095f

File tree

3 files changed

+107
-1
lines changed

3 files changed

+107
-1
lines changed
 

‎.cane

Whitespace-only changes.

‎.tailor

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#------------------------------------------------------------------------------
2+
# Horizontal Whitespace
3+
#------------------------------------------------------------------------------
4+
# allow_hard_tabs True to let hard tabs be considered a single space.
5+
# Default: false
6+
#
7+
# allow_trailing_line_spaces
8+
# True to skip detecting extra spaces at the ends of
9+
# lines.
10+
# Default: false
11+
#
12+
# indentation_spaces The number of spaces to consider a proper indent.
13+
# Default: 2
14+
#
15+
# max_line_length The maximum number of characters in a line before
16+
# tailor complains.
17+
# Default: 80
18+
# spaces_after_comma Number of spaces to expect after a comma.
19+
# Default: 1
20+
#
21+
# spaces_before_comma Number of spaces to expect before a comma.
22+
# Default: 0
23+
#
24+
# spaces_after_lbrace The number of spaces to expect after an lbrace ('{').
25+
# Default: 1
26+
#
27+
# spaces_before_lbrace The number of spaces to expect before an lbrace ('{').
28+
# Default: 1
29+
#
30+
# spaces_before_rbrace The number of spaces to expect before an rbrace ('}').
31+
# Default: 1
32+
#
33+
# spaces_in_empty_braces The number of spaces to expect between braces when
34+
# there's nothing in the braces (i.e. {}).
35+
# Default: 0
36+
#
37+
# spaces_after_lbracket The number of spaces to expect after an
38+
# lbracket ('[').
39+
# Default: 0
40+
#
41+
# spaces_before_rbracket The number of spaces to expect before an
42+
# rbracket (']').
43+
# Default: 0
44+
#
45+
# spaces_after_lparen The number of spaces to expect after an
46+
# lparen ('(').
47+
# Default: 0
48+
#
49+
# spaces_before_rparen The number of spaces to expect before an
50+
# rbracket (')').
51+
# Default: 0
52+
#
53+
#------------------------------------------------------------------------------
54+
# Naming
55+
#------------------------------------------------------------------------------
56+
# allow_camel_case_methods
57+
# Setting to true skips detection of camel-case method
58+
# names (i.e. def myMethod).
59+
# Default: false
60+
#
61+
# allow_screaming_snake_case_classes
62+
# Setting to true skips detection of screaming
63+
# snake-case class names (i.e. My_Class).
64+
# Default: false
65+
#
66+
#------------------------------------------------------------------------------
67+
# Vertical Whitespace
68+
#------------------------------------------------------------------------------
69+
# max_code_lines_in_class The number of lines of code in a class to allow before
70+
# tailor will warn you.
71+
# Default: 300
72+
#
73+
# max_code_lines_in_method
74+
# The number of lines of code in a method to allow
75+
# before tailor will warn you.
76+
# Default: 30
77+
#
78+
# trailing_newlines The number of newlines that should be at the end of
79+
# the file.
80+
# Default: 1
81+
#
82+
Tailor.config do |config|
83+
config.formatters "text"
84+
config.file_set 'lib/**/*.rb' do |style|
85+
style.allow_camel_case_methods false, level: :error
86+
style.allow_hard_tabs false, level: :error
87+
style.allow_screaming_snake_case_classes false, level: :error
88+
style.allow_trailing_line_spaces false, level: :error
89+
style.allow_invalid_ruby false, level: :warn
90+
style.indentation_spaces 2, level: :error
91+
style.max_code_lines_in_class 300, level: :error
92+
style.max_code_lines_in_method 30, level: :error
93+
style.max_line_length 80, level: :error
94+
style.spaces_after_comma 1, level: :off
95+
style.spaces_after_lbrace 1, level: :error
96+
style.spaces_after_lbracket 0, level: :error
97+
style.spaces_after_lparen 0, level: :error
98+
style.spaces_before_comma 0, level: :error
99+
style.spaces_before_lbrace 1, level: :off
100+
style.spaces_before_rbrace 1, level: :error
101+
style.spaces_before_rbracket 0, level: :error
102+
style.spaces_before_rparen 0, level: :error
103+
style.spaces_in_empty_braces 0, level: :error
104+
style.trailing_newlines 1, level: :error
105+
end
106+
end

‎lib/kitchen/driver/ec2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Ec2 < Kitchen::Driver::SSHBase
3333
default_config :region, 'us-east-1'
3434
default_config :availability_zone, 'us-east-1b'
3535
default_config :flavor_id, 'm1.small'
36-
default_config :groups, [ 'default' ]
36+
default_config :groups, ['default']
3737
default_config :tags, { 'created-by' => 'test-kitchen' }
3838
default_config :username, 'root'
3939

0 commit comments

Comments
 (0)
Please sign in to comment.