1- # inherit_from:
2- # - .rubocop_todo.yml
3-
1+ plugins :
2+ - rubocop-rake
3+ - rubocop-performance
4+ AllCops :
5+ TargetRubyVersion : 2.0
6+ SuggestExtensions : false
7+ NewCops : enable
8+ Exclude :
9+ - lib/yard/parser/ruby/legacy/irb/slex.rb
10+ - lib/yard/parser/ruby/legacy/ruby_lex.rb
11+ - lib/yard/server/http_utils.rb
412Metrics :
513 Enabled : false
14+ Performance :
15+ Exclude :
16+ - spec/**/*.rb
17+ Gemspec/RequireMFA :
18+ Enabled : false
619Layout/LineLength :
720 AutoCorrect : true
8- Max : 100
21+ Max : 120
22+ Exclude :
23+ - spec/**/*.rb
24+ Naming/MethodParameterName :
25+ Enabled : false
26+ Layout/EmptyLineAfterMagicComment :
27+ Enabled : false
28+ Layout/EmptyLineAfterGuardClause :
29+ Enabled : false
930Style/Semicolon :
1031 AllowAsExpressionSeparator : true
1132Style/Documentation :
@@ -30,19 +51,57 @@ Layout/FirstArrayElementIndentation:
3051 EnforcedStyle : consistent
3152Layout/FirstHashElementIndentation :
3253 EnforcedStyle : consistent
33-
34- # Disable these until we know what to do with them
3554Style/SafeNavigation :
3655 Enabled : false # not supported in 1.8...2.1
56+ Style/DocumentDynamicEvalDefinition : # not helpful
57+ Enabled : false
58+ Style/OpenStructUse :
59+ Enabled : false
60+ Style/MixinUsage :
61+ Exclude :
62+ - docs/**/*.rb
63+ - benchmarks/**/*.rb
64+ - spec/**/*
65+ - templates/**/*
66+ - lib/yard/templates/**/*
67+ Style/PercentLiteralDelimiters :
68+ PreferredDelimiters :
69+ " %w " : " ()"
70+ " %W " : " ()"
71+ " %i " : " ()"
72+ " %I " : " ()"
73+ Style/MultilineIfModifier : # autocorrect usually fails
74+ Enabled : false
75+ Style/OptionalBooleanParameter :
76+ Enabled : false
3777Style/GuardClause : # does not provide much value
3878 Enabled : false
79+ Style/IfWithBooleanLiteralBranches : # this isn't reliable
80+ Enabled : false
81+ Lint/DuplicateMethods :
82+ Enabled : false
83+ Lint/ConstantDefinitionInBlock :
84+ Exclude :
85+ - benchmarks/**/*.rb
86+ - docs/**/*.rb
87+ - spec/**/*.rb
88+ Style/FormatStringToken :
89+ Enabled : false
90+ Lint/UselessConstantScoping :
91+ Enabled : false
92+ Lint/SuppressedException :
93+ Enabled : false
94+ Bundler/GemFilename :
95+ Enabled : false
3996Naming/VariableNumber :
4097 Enabled : false
4198Naming/AccessorMethodName : # this creates breaking changes in the API
4299 Enabled : false
43100Naming/PredicateName : # this creates breaking changes in the API
44101 Enabled : false
45- Style/MethodMissingSuper : # this doesn't exist in 1.8/1.9
102+ Naming/HeredocDelimiterNaming :
103+ Enabled : false
104+ Lint/MissingSuper : # this doesn't exist in 1.8/1.9
46105 Enabled : false
47106Style/MissingRespondToMissing : # this doesn't exist in 1.8/1.9
48107 Enabled : false
@@ -62,6 +121,10 @@ Style/ClassAndModuleChildren:
62121 Enabled : false
63122Layout/EmptyLineBetweenDefs :
64123 AllowAdjacentOneLineDefs : true
124+ Layout/EmptyLinesAroundAttributeAccessor :
125+ Enabled : false
126+ Style/EvalWithLocation :
127+ Enabled : false
65128Style/SingleLineMethods :
66129 Enabled : false
67130Style/SingleLineBlockParams :
@@ -89,13 +152,20 @@ Style/GlobalVars:
89152 Exclude :
90153 - benchmarks/**/*.rb
91154 - spec/**/*.rb
155+ Style/StderrPuts :
156+ Enabled : false
157+ Style/FileWrite :
158+ Enabled : false
159+ Style/FileRead :
160+ Enabled : false
92161Lint/RedundantSplatExpansion :
93162 Enabled : false
94163Security/Eval :
95164 Exclude :
96165 - benchmarks/**/*.rb
97166 - spec/**/*.rb
98-
167+ Security/MarshalLoad :
168+ Enabled : false
99169Layout/SpaceAroundMethodCallOperator :
100170 Enabled : false
101171Lint/RaiseException :
0 commit comments