Skip to content

chore(phone): Remove Mapperly-generated code quality errors - #335

Merged
bniedzie merged 1 commit into
mainfrom
chore/phone-code-quality-cleanup
Sep 2, 2026
Merged

chore(phone): Remove Mapperly-generated code quality errors#335
bniedzie merged 1 commit into
mainfrom
chore/phone-code-quality-cleanup

Conversation

@bniedzie

@bniedzie bniedzie commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

CodeQL flagged 5 cs/missed-ternary-operator errors (779-783), generated by Mapperly code at web/obj/Debug/net10.0/generated/Riok.Mapperly/Riok.Mapperly.MapperGenerator/PersonnelMapper.g.cs, introduced as part of #323.

While this code is not committed as part of the repository, it can be removed by allowing DTO mappers to accept null if they are called as part of nested mappings that are nullable. This simplifies the generated code with no impact to the output, since Mapperly would already treat the output as null in this case, and the methods in question are private.

@codecov-commenter

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov-commenter

codecov-commenter commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.66%. Comparing base (fb8afd0) to head (11c6e61).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #335   +/-   ##
=======================================
  Coverage   44.66%   44.66%           
=======================================
  Files        1067     1067           
  Lines       51985    51985           
  Branches     6129     6129           
=======================================
  Hits        23217    23217           
  Misses      27792    27792           
  Partials      976      976           
Flag Coverage Δ
backend 42.11% <ø> (ø)
frontend 63.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@rlorenzo

rlorenzo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Ah, CodeQL was looking at generated code? Can we set up CodeQL to ignore that folder?

@bniedzie

bniedzie commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Ah, CodeQL was looking at generated code? Can we set up CodeQL to ignore that folder?

It appears not - this seems to be the same issue documented at 3b077f96d#diff-3c168dbb160e6a97e58e9babfc08dcd60f89cf2c81ff592398940c29e576b870R6.

I can push through this change or just dismiss the findings - either works.

@bniedzie
bniedzie merged commit e44b687 into main Sep 2, 2026
13 of 14 checks passed
@bniedzie
bniedzie deleted the chore/phone-code-quality-cleanup branch September 2, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants