diff --git a/.rubocop.yml b/.rubocop.yml index 5f99bab4..4306cef2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,30 +7,15 @@ inherit_mode: merge: - Exclude -AllCops: - TargetRubyVersion: 2.5 - Exclude: - - bin/**/* - - config.ru - - db/schema.rb - - vendor/**/* - - vendor/bundle/**/* - -Metrics/BlockLength: - Exclude: - - 'config/routes.rb' - - 'lib/tasks/**/*.rake' - - 'spec/**/*.rb' - -Style/FormatStringToken: - Exclude: - - "config/routes.rb" - -Rails/OutputSafety: - Enabled: false - -Rails/FilePath: - EnforcedStyle: slashes +# ************************************************************** +# TRY NOT TO ADD OVERRIDES IN THIS FILE +# +# This repo is configured to follow the RuboCop GOV.UK styleguide. +# Any rules you override here will cause this repo to diverge from +# the way we write code in all other GOV.UK repos. +# +# See https://github.com/alphagov/rubocop-govuk/blob/main/CONTRIBUTING.md +# ************************************************************** Rails/SaveBang: AllowedReceivers: diff --git a/config/routes.rb b/config/routes.rb index c916daf9..9c7a4e55 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -59,6 +59,6 @@ match "*path", to: redirect(domain: ENV["CKAN_DOMAIN"], subdomain: "", path: "/%{path}"), via: :all, - constraints: { path: /(?!#{Regexp.quote(Rails.application.config.assets.prefix[1..-1])}).+/ } + constraints: { path: /(?!#{Regexp.quote(Rails.application.config.assets.prefix[1..])}).+/ } end end