Skip to content

Commit 86e361c

Browse files
committed
lint
1 parent 5de708f commit 86e361c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ Lint/ConstantDefinitionInBlock:
5555
Style/StringLiterals:
5656
Exclude:
5757
- 'Gemfile'
58+
Naming/PredicateMethod:
59+
Enabled: false

lib/solarwinds_apm/support/resource_detector/aws/ecs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ def merge_metadata(attribute, container_metadata, task_metadata)
134134

135135
def get_account_id_from_arn(task_arn)
136136
matches = task_arn.to_s.match(/arn:aws:ecs:[^:]+:([^:]+):.*/)
137-
matches ? matches[1] : nil
137+
matches.nil? ? matches[1] : nil
138138
end
139139

140140
def get_region_from_arn(task_arn)
141141
matches = task_arn.to_s.match(/arn:aws:ecs:([^:]+):.*/)
142-
matches ? matches[1] : nil
142+
matches.nil? ? matches[1] : nil
143143
end
144144

145145
def get_url_as_json(url)

0 commit comments

Comments
 (0)