Skip to content

Conversation

@Lionqueen94
Copy link
Contributor

@Lionqueen94 Lionqueen94 commented Dec 27, 2025

Description

Functions improved (removed #[allow(clippy::too_many_lines)]):

  • src/
    • data_entry/validation.rs:
      • validate_differences_counts
      • CommonPollingStationResults: validate
      • VotesCounts: validate
      • test_f305_more_and_fewer_ballots_count
      • test_f307_votes_greater_than_voters
      • test_f401

7 instances of #[allow(clippy::too_many_lines)] left in the codebase of which 3 related to generating test elections

@Lionqueen94 Lionqueen94 self-assigned this Dec 27, 2025
@Lionqueen94 Lionqueen94 requested a review from a team as a code owner December 27, 2025 18:21
@github-actions
Copy link

github-actions bot commented Dec 27, 2025

Sigrid maintainability feedback

↗️ You improved your code towards your objective of 3.5 stars.

Show details

Sigrid compared your code against the baseline of 2025-12-29.

👍 What went well?

You fixed or improved 10 refactoring candidates.

Risk System property Location
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 652-658
backend/src/data_entry/validation.rs line 684-690
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 372-379
backend/src/data_entry/validation.rs line 401-408
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 216-221
backend/src/data_entry/validation.rs line 436-441
backend/src/data_entry/validation.rs line 494-499
+ 8 occurrences
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 868-874
backend/src/data_entry/validation.rs line 436-442
backend/src/data_entry/validation.rs line 930-936
+ 7 occurrences
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 436-443
backend/src/data_entry/validation.rs line 494-501
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 529-536
backend/src/data_entry/validation.rs line 759-766
🔴 Duplication
(Fixed)
backend/src/data_entry/validation.rs line 868-877
backend/src/data_entry/validation.rs line 930-939
🔴 Unit Size
(Fixed)
backend/src/data_entry/validation.rs
validate_differences_counts(DifferencesCounts,u32,u32,ValidationResults,FieldPath)
⚫️ + 2 more

👎 What could be better?

Unfortunately, 24 refactoring candidates were introduced or got worse.

Risk System property Location
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 942-951
backend/src/data_entry/validation.rs line 1004-1013
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 477-484
backend/src/data_entry/validation.rs line 535-542
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 772-778
backend/src/data_entry/validation.rs line 629-635
backend/src/data_entry/validation.rs line 979-985
+ 7 occurrences
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 708-714
backend/src/data_entry/validation.rs line 740-746
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 216-221
backend/src/data_entry/validation.rs line 477-482
backend/src/data_entry/validation.rs line 535-540
+ 8 occurrences
🔴 Duplication
(Introduced)
backend/src/data_entry/validation.rs line 349-355
backend/src/data_entry/validation.rs line 378-384
🟠 Unit Size
(Introduced)
backend/src/data_entry/validation.rs
VotesCounts.validate_votes_counts_errors(ValidationResults,FieldPath)
🟠 Unit Size
(Introduced)
backend/src/data_entry/validation.rs
validate(ElectionWithPoliticalGroups,PollingStation,ValidationResults,FieldPath)
⚫️ + 16 more

📚 Remaining technical debt

4 refactoring candidates didn't get better or worse, but are still present in the code you touched.

View this system in Sigrid to explore your technical debt

⭐️ Sigrid ratings

System property System on 2025-12-29 Before changes New/changed code
Volume 3.4 N/A N/A
Duplication 3.7 2.4 2.4
Unit Size 2.2 1.2 1.5
Unit Complexity 3.0 0.9 2.5
Unit Interfacing 2.9 0.5 0.5
Module Coupling 3.3 N/A N/A
Component Independence 2.0 N/A N/A
Component Entanglement 2.3 N/A N/A
Maintainability 2.9 1.3 2.0

💬 Did you find this feedback helpful?

We would like to know your thoughts to make Sigrid better.
Your username will remain confidential throughout the process.


View this system in Sigrid

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 98.30508% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.86%. Comparing base (1cb3565) to head (8373754).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
backend/src/data_entry/validation.rs 98.30% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2665      +/-   ##
==========================================
+ Coverage   91.83%   91.86%   +0.03%     
==========================================
  Files         376      376              
  Lines       18387    18456      +69     
  Branches     1711     1711              
==========================================
+ Hits        16886    16955      +69     
  Misses       1407     1407              
  Partials       94       94              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

PDF Diff Summary

Comparing against base branch: main

File Status
model-n-10-2.pdf ✅ No changes
model-na-14-2-bijlage1.pdf ✅ No changes
model-na-14-2.pdf ✅ No changes
model-na-31-2-bijlage1.pdf ✅ No changes
model-na-31-2-inlegvel.pdf ✅ No changes
model-na-31-2.pdf ✅ No changes
model-p-2a.pdf ✅ No changes

@Lionqueen94 Lionqueen94 added backend Issues or pull requests that relate to the backend tech debt Tech debt, potential refactorings labels Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Issues or pull requests that relate to the backend tech debt Tech debt, potential refactorings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants