Enable the Lint/UselessAssignment cop
This commit is contained in:
parent
0336ecf639
commit
0c8b228fbf
4 changed files with 7 additions and 4 deletions
|
@ -486,7 +486,9 @@ Lint/UselessAccessModifier:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Lint/UselessAssignment:
|
Lint/UselessAssignment:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- "spec/**/*"
|
||||||
|
|
||||||
Lint/UselessComparison:
|
Lint/UselessComparison:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
@ -10,7 +10,7 @@ class PiecesJustificativesService
|
||||||
errors = with_virus
|
errors = with_virus
|
||||||
.map { |_, content| "#{content.original_filename} : virus détecté" }
|
.map { |_, content| "#{content.original_filename} : virus détecté" }
|
||||||
|
|
||||||
errors += without_virus
|
errors + without_virus
|
||||||
.map { |tpj, content| save_pj(content, dossier, tpj, user) }
|
.map { |tpj, content| save_pj(content, dossier, tpj, user) }
|
||||||
.compact()
|
.compact()
|
||||||
end
|
end
|
||||||
|
|
|
@ -212,7 +212,8 @@ class ProcedureExportService
|
||||||
etablissement.champ.dossier_id,
|
etablissement.champ.dossier_id,
|
||||||
label_for_export(etablissement.champ.libelle).to_s
|
label_for_export(etablissement.champ.libelle).to_s
|
||||||
]
|
]
|
||||||
data += etablissement_data(etablissement)
|
|
||||||
|
data + etablissement_data(etablissement)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace :'2018_09_12_fix_templates' do
|
||||||
task run: :environment do
|
task run: :environment do
|
||||||
dossiers_with_invalid_attestations = find_dossiers_with_sent_and_invalid_attestations
|
dossiers_with_invalid_attestations = find_dossiers_with_sent_and_invalid_attestations
|
||||||
fix_templates
|
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)
|
send_regenerated_attestations(dossiers_with_invalid_attestations)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue