Roodi Results

Roodi parses your Ruby code and warns you about design issues you have based on the checks that is has configured.

File Path Warning
app/models/signature.rb:456 Found = in conditional. It should probably be an ==
app/models/signature.rb:475 Found = in conditional. It should probably be an ==
app/models/constituency.rb:46 Found = in conditional. It should probably be an ==
app/models/constituency/api_query.rb:50 Found = in conditional. It should probably be an ==
app/models/petition.rb:478 Found = in conditional. It should probably be an ==
app/models/archived/petition.rb:301 Found = in conditional. It should probably be an ==
app/models/concerns/geoip_lookup.rb:12 Found = in conditional. It should probably be an ==
app/models/concerns/geoip_lookup.rb:18 Found = in conditional. It should probably be an ==
app/models/concerns/geoip_lookup.rb:45 Found = in conditional. It should probably be an ==
app/jobs/refresh_constituency_party_job.rb:19 Found = in conditional. It should probably be an ==
app/jobs/archive_petition_job.rb:32 Found = in conditional. It should probably be an ==
app/jobs/archive_petition_job.rb:39 Found = in conditional. It should probably be an ==
app/jobs/archive_petition_job.rb:47 Found = in conditional. It should probably be an ==
app/jobs/archive_petition_job.rb:66 Found = in conditional. It should probably be an ==
app/jobs/archive_petition_job.rb:76 Found = in conditional. It should probably be an ==
app/jobs/backfill_constituencies_job.rb:14 Found = in conditional. It should probably be an ==
app/jobs/concerns/rate_limiting.rb:20 Found = in conditional. It should probably be an ==
app/controllers/petitions_controller.rb:109 Found = in conditional. It should probably be an ==
app/controllers/concerns/flash_render.rb:10 Found = in conditional. It should probably be an ==
app/controllers/concerns/flash_render.rb:15 Found = in conditional. It should probably be an ==
app/controllers/concerns/flash_i18n.rb:11 Found = in conditional. It should probably be an ==
app/helpers/form_helper.rb:14 Found = in conditional. It should probably be an ==
app/helpers/auto_link_helper.rb:86 Found = in conditional. It should probably be an ==
app/models/statistics.rb:18 Case statement is missing an else clause.
app/jobs/stop_petitions_early_job.rb:27 Case statement is missing an else clause.
app/models/signature.rb:5 Class "Signature" has 762 lines. It should have 300 or less.
app/models/rate_limit.rb:3 Class "RateLimit" has 301 lines. It should have 300 or less.
app/models/site.rb:5 Class "Site" has 463 lines. It should have 300 or less.
app/models/petition.rb:3 Class "Petition" has 883 lines. It should have 300 or less.
app/models/archived/signature.rb:6 Class "Signature" has 308 lines. It should have 300 or less.
app/models/archived/petition.rb:5 Class "Petition" has 378 lines. It should have 300 or less.
lib/package_builder.rb:7 Class "PackageBuilder" has 1041 lines. It should have 300 or less.
app/models/signature.rb:542 Block cyclomatic complexity is 7. It should be 4 or less.
app/models/rate_limit.rb:28 Block cyclomatic complexity is 15. It should be 4 or less.
app/models/invalidation.rb:34 Block cyclomatic complexity is 13. It should be 4 or less.
app/lib/admin/task_runner.rb:4 Block cyclomatic complexity is 5. It should be 4 or less.
app/jobs/trending_domains_by_petition_job.rb:11 Block cyclomatic complexity is 5. It should be 4 or less.
app/jobs/update_signature_counts_job.rb:25 Block cyclomatic complexity is 6. It should be 4 or less.
app/jobs/archive_petition_job.rb:8 Block cyclomatic complexity is 9. It should be 4 or less.
app/jobs/trending_ips_by_petition_job.rb:12 Block cyclomatic complexity is 5. It should be 4 or less.
app/helpers/page_title_helper.rb:39 Block cyclomatic complexity is 6. It should be 4 or less.
app/helpers/auto_link_helper.rb:73 Block cyclomatic complexity is 8. It should be 4 or less.
app/helpers/auto_link_helper.rb:105 Block cyclomatic complexity is 5. It should be 4 or less.
app/models/petition_creator.rb:168 Method name "validate_creator" cyclomatic complexity is 13. It should be 8 or less.
app/models/signature.rb:200 Method name "search" cyclomatic complexity is 11. It should be 8 or less.
app/models/signature.rb:532 Method name "validate!" cyclomatic complexity is 13. It should be 8 or less.
app/models/invalidation.rb:153 Method name "matching_signatures" cyclomatic complexity is 10. It should be 8 or less.
app/models/petition.rb:472 Method name "increment_signature_count!" cyclomatic complexity is 10. It should be 8 or less.
app/models/archived/signature.rb:122 Method name "search" cyclomatic complexity is 11. It should be 8 or less.
app/jobs/archive_petition_job.rb:6 Method name "perform" cyclomatic complexity is 11. It should be 8 or less.
app/models/petition_creator.rb:168 Method "validate_creator" has 21 lines. It should have 20 or less.
app/models/statistics.rb:3 Method "moderation" has 30 lines. It should have 20 or less.
app/models/signature.rb:200 Method "search" has 39 lines. It should have 20 or less.
app/models/signature.rb:532 Method "validate!" has 45 lines. It should have 20 or less.
app/models/petition.rb:472 Method "increment_signature_count!" has 36 lines. It should have 20 or less.
app/models/archived/signature.rb:122 Method "search" has 37 lines. It should have 20 or less.
app/jobs/update_signature_counts_job.rb:15 Method "perform" has 42 lines. It should have 20 or less.
app/jobs/archive_signatures_job.rb:4 Method "perform" has 63 lines. It should have 20 or less.
lib/arel_extensions.rb:40 Method name "visit_Arel_Nodes_Contained" should match pattern /^[_a-z<>=\[|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/
lib/arel_extensions.rb:44 Method name "visit_Arel_Nodes_Contains" should match pattern /^[_a-z<>=\[|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/
lib/arel_extensions.rb:48 Method name "visit_Arel_Nodes_Overlaps" should match pattern /^[_a-z<>=\[|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/

Generated on 2019-09-22 14:30:40 -0400