Enable the Lint/UselessAssignment cop

This commit is contained in:
gregoirenovel 2018-12-24 18:00:32 +01:00 committed by Pierre de La Morinerie
parent 0336ecf639
commit 0c8b228fbf
4 changed files with 7 additions and 4 deletions

View file

@ -486,7 +486,9 @@ Lint/UselessAccessModifier:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Enabled: true
Exclude:
- "spec/**/*"
Lint/UselessComparison:
Enabled: true

View file

@ -10,7 +10,7 @@ class PiecesJustificativesService
errors = with_virus
.map { |_, content| "#{content.original_filename} : virus détecté" }
errors += without_virus
errors + without_virus
.map { |tpj, content| save_pj(content, dossier, tpj, user) }
.compact()
end

View file

@ -212,7 +212,8 @@ class ProcedureExportService
etablissement.champ.dossier_id,
label_for_export(etablissement.champ.libelle).to_s
]
data += etablissement_data(etablissement)
data + etablissement_data(etablissement)
end
end

View file

@ -2,7 +2,7 @@ namespace :'2018_09_12_fix_templates' do
task run: :environment do
dossiers_with_invalid_attestations = find_dossiers_with_sent_and_invalid_attestations
fix_templates
fixed_attestations = delete_then_regenerate_attestations(dossiers_with_invalid_attestations)
delete_then_regenerate_attestations(dossiers_with_invalid_attestations)
send_regenerated_attestations(dossiers_with_invalid_attestations)
end