Skip to content

Fix lint #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ Metrics/PerceivedComplexity:
Max: 10
Metrics/AbcSize:
Max: 30
# Lint/AmbiguousBlockAssociation is incompatible with RSpec
# https://github.com/rubocop-hq/rubocop/issues/4222
Lint/AmbiguousBlockAssociation:
Enabled: false
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env rake
# frozen_string_literal: true

require 'rake/testtask'
require 'rubocop/rake_task'
Expand Down
3 changes: 2 additions & 1 deletion controls/nginx_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: UTF-8
# frozen_string_literal: true

# Copyright 2015, Patrick Muench
#
Expand Down Expand Up @@ -255,7 +256,7 @@

only_if { HTTP_METHODS_CHECK != false }
describe file(nginx_conf) do
its('content') { should match(/^\s*if\s+\(\$request_method\s+\!\~\s+\^\(#{HTTP_METHODS}\)\$\)\{?$/) }
its('content') { should match(/^\s*if\s+\(\$request_method\s+!~\s+\^\(#{HTTP_METHODS}\)\$\)\{?$/) }
end
end

Expand Down
2 changes: 2 additions & 0 deletions libraries/nginx_lib.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright 2016, Patrick Muench
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down