From aac75106efcec7e6475499ed6eabc43112a29170 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 12 Jun 2017 15:35:21 +0200 Subject: [PATCH] Enable the Layout/EmptyLinesAroundAccessModifier cop --- .rubocop.yml | 2 +- app/validators/siret_format_validator.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index b7a323e8b..7eb773e35 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -46,7 +46,7 @@ Layout/EmptyLines: Enabled: true Layout/EmptyLinesAroundAccessModifier: - Enabled: false + Enabled: true Layout/EmptyLinesAroundBeginBody: Enabled: true diff --git a/app/validators/siret_format_validator.rb b/app/validators/siret_format_validator.rb index 50197f0c6..b891766f1 100644 --- a/app/validators/siret_format_validator.rb +++ b/app/validators/siret_format_validator.rb @@ -9,6 +9,7 @@ class SiretFormatValidator < ActiveModel::EachValidator end private + def luhn_checksum(value) accum = 0 value.reverse.each_char.map(&:to_i).each_with_index do |digit, index|