Skip to content

Commit 0285e5a

Browse files
committed
chore: rubocop
1 parent 09fba8e commit 0285e5a

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

.rubocop_todo.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-07-17 06:40:49 UTC using RuboCop version 1.78.0.
3+
# on 2025-07-17 07:21:41 UTC using RuboCop version 1.78.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -13,6 +13,14 @@ Gemspec/RequiredRubyVersion:
1313
Exclude:
1414
- 'unitsdb.gemspec'
1515

16+
# Offense count: 1
17+
# This cop supports safe autocorrection (--autocorrect).
18+
# Configuration parameters: EnforcedStyle, IndentationWidth.
19+
# SupportedStyles: with_first_argument, with_fixed_indentation
20+
Layout/ArgumentAlignment:
21+
Exclude:
22+
- 'lib/unitsdb/commands/qudt/updater.rb'
23+
1624
# Offense count: 1
1725
# This cop supports safe autocorrection (--autocorrect).
1826
# Configuration parameters: EnforcedStyleAlignWith.
@@ -37,6 +45,13 @@ Lint/DuplicateBranch:
3745
- 'lib/unitsdb/commands/ucum/matcher.rb'
3846
- 'lib/unitsdb/database.rb'
3947

48+
# Offense count: 1
49+
# This cop supports safe autocorrection (--autocorrect).
50+
# Configuration parameters: AutoCorrect.
51+
Lint/UselessAssignment:
52+
Exclude:
53+
- 'lib/unitsdb/commands/qudt/updater.rb'
54+
4055
# Offense count: 87
4156
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
4257
Metrics/AbcSize:
@@ -182,14 +197,6 @@ Style/OptionalBooleanParameter:
182197
- 'lib/unitsdb/commands/ucum/check.rb'
183198
- 'lib/unitsdb/commands/ucum/updater.rb'
184199

185-
# Offense count: 1
186-
# This cop supports safe autocorrection (--autocorrect).
187-
# Configuration parameters: AllowedMethods.
188-
# AllowedMethods: nonzero?
189-
Style/RedundantCondition:
190-
Exclude:
191-
- 'lib/unitsdb/commands/qudt/updater.rb'
192-
193200
# Offense count: 1
194201
# Configuration parameters: Max.
195202
Style/SafeNavigationChainLength:

lib/unitsdb/commands/qudt/updater.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,12 @@ def get_original_yaml_file(_db_entities, output_file)
139139

140140
# Try to find the original file in the database directory
141141
# Look for it relative to where we expect it to be
142-
database_dir = nil
142+
# nil
143143

144144
# Try to get database directory from environment or assume it's the fixtures
145-
if ENV["UNITSDB_DATABASE_PATH"]
146-
database_dir = ENV["UNITSDB_DATABASE_PATH"]
147-
else
148-
# Default to the fixtures directory for testing
149-
database_dir = File.join(File.dirname(__FILE__),
150-
"../../../spec/fixtures/unitsdb")
151-
end
145+
database_dir = ENV["UNITSDB_DATABASE_PATH"] ||
146+
File.join(File.dirname(__FILE__),
147+
"../../../spec/fixtures/unitsdb")
152148

153149
original_yaml_file = File.join(database_dir, "#{entity_type}.yaml")
154150

spec/fixtures/unitsdb

Submodule unitsdb updated 1 file

0 commit comments

Comments
 (0)