Skip to content

Commit d1cbc3a

Browse files
committed
rubo-cop auto-correct
1 parent 53002dd commit d1cbc3a

23 files changed

+217
-487
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 262 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,11 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 1
10-
# Cop supports --auto-correct.
11-
# Configuration parameters: AlignWith, SupportedStyles.
12-
# SupportedStyles: either, start_of_block, start_of_line
13-
Lint/BlockAlignment:
14-
Exclude:
15-
- 'spec/lambdify_spec.rb'
16-
179
# Offense count: 1
1810
Lint/Eval:
1911
Exclude:
2012
- 'lib/symengine.rb'
2113

22-
# Offense count: 1
23-
# Cop supports --auto-correct.
24-
Lint/StringConversionInInterpolation:
25-
Exclude:
26-
- 'lib/symengine/basic.rb'
27-
2814
# Offense count: 1
2915
Metrics/AbcSize:
3016
Max: 20
@@ -40,38 +26,6 @@ Metrics/LineLength:
4026
Metrics/MethodLength:
4127
Max: 16
4228

43-
# Offense count: 6
44-
# Cop supports --auto-correct.
45-
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
46-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
47-
Style/AlignHash:
48-
Exclude:
49-
- 'lib/symengine.rb'
50-
51-
# Offense count: 1
52-
# Cop supports --auto-correct.
53-
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
54-
# SupportedStyles: line_count_based, semantic, braces_for_chaining
55-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
56-
# FunctionalMethods: let, let!, subject, watch
57-
# IgnoredMethods: lambda, proc, it
58-
Style/BlockDelimiters:
59-
Exclude:
60-
- 'spec/functions_spec.rb'
61-
62-
# Offense count: 83
63-
# Cop supports --auto-correct.
64-
Style/ColonMethodCall:
65-
Exclude:
66-
- 'lib/symengine.rb'
67-
- 'lib/symengine/basic.rb'
68-
- 'spec/evalf_spec.rb'
69-
- 'spec/function_symbol_spec.rb'
70-
- 'spec/functions_spec.rb'
71-
- 'spec/lambdify_spec.rb'
72-
- 'spec/ntheory_spec.rb'
73-
- 'spec/symengine_spec.rb'
74-
7529
# Offense count: 8
7630
Style/Documentation:
7731
Exclude:
@@ -85,233 +39,17 @@ Style/Documentation:
8539
- 'lib/symengine/iruby.rb'
8640
- 'lib/symengine/undef_function.rb'
8741

88-
# Offense count: 6
89-
# Cop supports --auto-correct.
90-
# Configuration parameters: AllowAdjacentOneLineDefs.
91-
Style/EmptyLineBetweenDefs:
92-
Exclude:
93-
- 'lib/symengine.rb'
94-
- 'lib/symengine/basic.rb'
95-
96-
# Offense count: 5
97-
# Cop supports --auto-correct.
98-
# Configuration parameters: EnforcedStyle, SupportedStyles.
99-
# SupportedStyles: empty_lines, no_empty_lines
100-
Style/EmptyLinesAroundBlockBody:
101-
Exclude:
102-
- 'spec/constant_spec.rb'
103-
- 'spec/function_symbol_spec.rb'
104-
- 'spec/lambdify_spec.rb'
105-
- 'spec/real_mpfr_spec.rb'
106-
- 'spec/symengine_spec.rb'
107-
108-
# Offense count: 1
109-
# Cop supports --auto-correct.
110-
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
111-
Style/ExtraSpacing:
112-
Exclude:
113-
- 'spec/evalf_spec.rb'
114-
11542
# Offense count: 1
11643
# Configuration parameters: EnforcedStyle, SupportedStyles.
11744
# SupportedStyles: format, sprintf, percent
11845
Style/FormatString:
11946
Exclude:
12047
- 'ext/symengine/extconf.rb'
12148

122-
# Offense count: 1
123-
# Cop supports --auto-correct.
124-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
125-
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
126-
Style/HashSyntax:
127-
Exclude:
128-
- 'notebooks/Gemfile'
129-
130-
# Offense count: 1
131-
# Cop supports --auto-correct.
132-
# Configuration parameters: EnforcedStyle, SupportedStyles.
133-
# SupportedStyles: normal, rails
134-
Style/IndentationConsistency:
135-
Exclude:
136-
- 'spec/constant_spec.rb'
137-
138-
# Offense count: 18
139-
# Cop supports --auto-correct.
140-
# Configuration parameters: Width.
141-
Style/IndentationWidth:
142-
Exclude:
143-
- 'ext/symengine/extconf.rb'
144-
- 'lib/symengine.rb'
145-
- 'lib/symengine/complex.rb'
146-
- 'lib/symengine/complex_double.rb'
147-
- 'lib/symengine/integer.rb'
148-
- 'lib/symengine/undef_function.rb'
149-
- 'spec/evalf_spec.rb'
150-
- 'spec/lambdify_spec.rb'
151-
- 'symengine.gemspec'
152-
153-
# Offense count: 1
154-
# Cop supports --auto-correct.
155-
# Configuration parameters: EnforcedStyle, SupportedStyles.
156-
# SupportedStyles: call, braces
157-
Style/LambdaCall:
158-
Exclude:
159-
- 'spec/function_symbol_spec.rb'
160-
161-
# Offense count: 1
162-
# Cop supports --auto-correct.
163-
# Configuration parameters: EnforcedStyle, SupportedStyles.
164-
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
165-
Style/MethodDefParentheses:
166-
Exclude:
167-
- 'lib/symengine.rb'
168-
16949
# Offense count: 1
17050
# Configuration parameters: EnforcedStyle, SupportedStyles.
17151
# SupportedStyles: snake_case, camelCase
17252
Style/MethodName:
17353
Exclude:
17454
- 'lib/symengine.rb'
17555

176-
# Offense count: 1
177-
# Cop supports --auto-correct.
178-
# Configuration parameters: EnforcedStyle, SupportedStyles.
179-
# SupportedStyles: symmetrical, new_line, same_line
180-
Style/MultilineArrayBraceLayout:
181-
Exclude:
182-
- 'spec/functions_spec.rb'
183-
184-
# Offense count: 2
185-
# Cop supports --auto-correct.
186-
Style/NumericLiterals:
187-
MinDigits: 11
188-
189-
# Offense count: 3
190-
# Cop supports --auto-correct.
191-
# Configuration parameters: AllowSafeAssignment.
192-
Style/ParenthesesAroundCondition:
193-
Exclude:
194-
- 'ext/symengine/extconf.rb'
195-
196-
# Offense count: 3
197-
# Cop supports --auto-correct.
198-
# Configuration parameters: PreferredDelimiters.
199-
Style/PercentLiteralDelimiters:
200-
Exclude:
201-
- 'spec/symbol_spec.rb'
202-
203-
# Offense count: 2
204-
# Cop supports --auto-correct.
205-
Style/RedundantParentheses:
206-
Exclude:
207-
- 'spec/function_symbol_spec.rb'
208-
- 'spec/functions_spec.rb'
209-
210-
# Offense count: 3
211-
# Cop supports --auto-correct.
212-
Style/RedundantSelf:
213-
Exclude:
214-
- 'lib/symengine/integer.rb'
215-
- 'lib/symengine/iruby.rb'
216-
217-
# Offense count: 2
218-
# Cop supports --auto-correct.
219-
# Configuration parameters: SupportedStyles.
220-
# SupportedStyles: space, no_space
221-
Style/SpaceAroundEqualsInParameterDefault:
222-
EnforcedStyle: no_space
223-
224-
# Offense count: 14
225-
# Cop supports --auto-correct.
226-
# Configuration parameters: AllowForAlignment.
227-
Style/SpaceAroundOperators:
228-
Exclude:
229-
- 'spec/basic_spec.rb'
230-
- 'spec/constant_spec.rb'
231-
- 'spec/function_symbol_spec.rb'
232-
- 'spec/functions_spec.rb'
233-
- 'spec/lambdify_spec.rb'
234-
235-
# Offense count: 1
236-
# Cop supports --auto-correct.
237-
# Configuration parameters: AllowForAlignment.
238-
Style/SpaceBeforeFirstArg:
239-
Exclude:
240-
- 'spec/evalf_spec.rb'
241-
242-
# Offense count: 10
243-
# Cop supports --auto-correct.
244-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
245-
# SupportedStyles: space, no_space
246-
Style/SpaceInsideBlockBraces:
247-
Exclude:
248-
- 'lib/symengine.rb'
249-
- 'lib/symengine/basic.rb'
250-
- 'spec/basic_spec.rb'
251-
- 'spec/constant_spec.rb'
252-
- 'spec/functions_spec.rb'
253-
- 'spec/lambdify_spec.rb'
254-
255-
# Offense count: 39
256-
# Cop supports --auto-correct.
257-
Style/SpaceInsideParens:
258-
Exclude:
259-
- 'spec/lambdify_spec.rb'
260-
261-
# Offense count: 66
262-
# Cop supports --auto-correct.
263-
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
264-
# SupportedStyles: single_quotes, double_quotes
265-
Style/StringLiterals:
266-
Exclude:
267-
- 'ext/symengine/extconf.rb'
268-
- 'lib/symengine.rb'
269-
- 'lib/symengine/basic.rb'
270-
- 'lib/symengine/complex_double.rb'
271-
- 'spec/basic_spec.rb'
272-
- 'spec/evalf_spec.rb'
273-
- 'spec/functions_spec.rb'
274-
- 'spec/lambdify_spec.rb'
275-
- 'spec/real_mpfr_spec.rb'
276-
- 'symengine.gemspec'
277-
278-
# Offense count: 1
279-
# Cop supports --auto-correct.
280-
# Configuration parameters: IgnoredMethods.
281-
# IgnoredMethods: respond_to, define_method
282-
Style/SymbolProc:
283-
Exclude:
284-
- 'spec/functions_spec.rb'
285-
286-
# Offense count: 3
287-
# Cop supports --auto-correct.
288-
# Configuration parameters: EnforcedStyle, SupportedStyles.
289-
# SupportedStyles: final_newline, final_blank_line
290-
Style/TrailingBlankLines:
291-
Exclude:
292-
- 'spec/complex_double_spec.rb'
293-
- 'spec/complex_spec.rb'
294-
- 'spec/function_symbol_spec.rb'
295-
296-
# Offense count: 31
297-
# Cop supports --auto-correct.
298-
Style/TrailingWhitespace:
299-
Exclude:
300-
- 'lib/symengine.rb'
301-
- 'lib/symengine/basic.rb'
302-
- 'lib/symengine/complex.rb'
303-
- 'lib/symengine/complex_double.rb'
304-
- 'lib/symengine/undef_function.rb'
305-
- 'spec/complex_double_spec.rb'
306-
- 'spec/complex_spec.rb'
307-
- 'spec/constant_spec.rb'
308-
- 'spec/evalf_spec.rb'
309-
- 'spec/function_symbol_spec.rb'
310-
- 'spec/lambdify_spec.rb'
311-
- 'spec/real_mpfr_spec.rb'
312-
313-
# Offense count: 1
314-
# Cop supports --auto-correct.
315-
Style/ZeroLengthPredicate:
316-
Exclude:
317-
- 'lib/symengine.rb'

ext/symengine/extconf.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
ruby_executable = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'] + RbConfig::CONFIG['EXEEXT'])
44

5-
generator = ""
6-
7-
if (RbConfig::CONFIG['host_os'] =~ /mingw/)
8-
generator = '-G "MSYS Makefiles"'
9-
elsif (RbConfig::CONFIG['host_os'] =~ /cygwin/)
10-
generator = '-G "Unix Makefiles"'
11-
elsif (RbConfig::CONFIG['host_os'] =~ /mswin/)
12-
generator = '-G "NMake Makefiles"'
5+
generator = ''
6+
7+
if RbConfig::CONFIG['host_os'] =~ /mingw/
8+
generator = '-G "MSYS Makefiles"'
9+
elsif RbConfig::CONFIG['host_os'] =~ /cygwin/
10+
generator = '-G "Unix Makefiles"'
11+
elsif RbConfig::CONFIG['host_os'] =~ /mswin/
12+
generator = '-G "NMake Makefiles"'
1313
end
1414

15-
exec 'cmake %s -DCMAKE_INSTALL_PREFIX=../../ -DRUBY_EXECUTABLE=%s %s ../../ ' % [generator, ruby_executable, ARGV.join(" ")]
15+
exec 'cmake %s -DCMAKE_INSTALL_PREFIX=../../ -DRUBY_EXECUTABLE=%s %s ../../ ' % [generator, ruby_executable, ARGV.join(' ')]

0 commit comments

Comments
 (0)