Skip to content

Commit

Permalink
Comply with linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Oct 11, 2022
1 parent ed9a11f commit eb0a401
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 4 additions & 0 deletions lib/datadog/appsec/contrib/rack/gateway/watcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module Gateway
module Watcher
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/PerceivedComplexity
def self.watch
Instrumentation.gateway.watch('rack.request', :appsec) do |stack, request|
block = false
Expand Down Expand Up @@ -143,6 +145,8 @@ def self.watch
[ret, res]
end
end
# rubocop:enable Metrics/CyclomaticComplexity
# rubocop:enable Metrics/PerceivedComplexity
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/AbcSize

Expand Down
4 changes: 0 additions & 4 deletions lib/datadog/appsec/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def self.record(*events)
end
end

# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
def self.record_via_span(*events)
events.group_by { |e| e[:trace] }.each do |trace, event_group|
unless trace
Expand Down Expand Up @@ -110,8 +108,6 @@ def self.record_via_span(*events)
end
end
end
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/AbcSize
end
end
end
10 changes: 0 additions & 10 deletions spec/datadog/appsec/processor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@
}
end

context 'when ruleset is default' do
let(:ruleset) { :recommended }

before do
expect(Datadog::AppSec::Assets).to receive(:waf_rules).with(:recommended).and_call_original.twice
end

it { expect(described_class.new.send(:load_ruleset)).to be true }
end

context 'when ruleset is :recommended' do
let(:ruleset) { :recommended }

Expand Down

0 comments on commit eb0a401

Please sign in to comment.