-
Notifications
You must be signed in to change notification settings - Fork 2
/
.rubocop.yml
123 lines (94 loc) · 2.61 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
require: rubocop-sketchup
inherit_from:
- https://raw.githubusercontent.com/SketchUp/rubocop-sketchup/5bb95f8781bd19ea7592f3c6b9c50ee18bba71a8/sketchup-style.yml
# - .rubocop_todo.yml
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
Exclude:
- src/*/vendor/**/*
NewCops: enable
SketchUp:
SourcePath: src
TargetSketchUpVersion: 2014
Exclude:
- Gemfile
- profiling/**/*
- skippy/**/*
- tests/**/*
TargetRubyVersion: 2.0
SketchupSuggestions/Compatibility:
Exclude:
- src/tt_truebend/dpi.rb
# In debug code the encoding bug in Ruby isn't a big issue.
SketchupSuggestions/FileEncoding:
Exclude:
- src/tt_truebend/debug.rb
Layout/ClosingParenthesisIndentation:
Enabled: false
# Root extension file got an unusual indentation. That's fine.
# This is very particular to my TT::Plugin::Extension name scheme.
# Whoever might read this; the ::Plugin:: part is legacy naming I now regret.
Layout/IndentationWidth:
Exclude:
- 'src/*.rb'
# Ideal length should be 80. But some times it reads better to let the line
# bleed over by a little. In this project there are enough of these cases that
# the RuboCop max is set to 100.
Layout/LineLength:
Max: 100
# Spaces are fine to line up matrices etc to be more readable.
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
# Spaces are fine to line up matrices etc to be more readable.
Layout/SpaceInsideParens:
Enabled: false
# Need to rescue Exception for error logging.
Lint/RescueException:
Enabled: false
# Tests should have not upper size limit.
Metrics/ClassLength:
Max: 300
Exclude:
- 'profiling/**/*'
- 'tests/**/*'
Metrics/MethodLength:
Max: 30
Metrics/ModuleLength:
Max: 110
Metrics/ParameterLists:
Exclude:
- 'src/tt_truebend/bender.rb'
# Tests follow a different naming convention.
Naming/ClassAndModuleCamelCase:
Exclude:
- 'profiling/**/*'
- 'tests/**/*'
# Tests follow a different naming convention.
Naming/FileName:
Exclude:
- 'profiling/**/*'
- 'tests/**/*'
# Tool classes must use the SketchUp API method names.
Naming/MethodName:
Exclude:
- '**/*_tool.rb'
- '**/observers/*.rb'
- '**/tools/*.rb'
- '**/manipulators/*.rb'
Style/DoubleNegation:
Enabled: false
# Need to perform testing before enabling frozen string literals.
Style/FrozenStringLiteralComment:
Enabled: false
Style/AccessorGrouping:
Enabled: false
Style/MultilineIfModifier:
Enabled: false
Style/MultilineTernaryOperator:
Exclude:
- 'src/tt_truebend/geom/polar_projection.rb'
# Some times parentheses reads clearer.
Style/TernaryParentheses:
Enabled: false