Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: resolve eslint warnings (max-depth, complexity) - src/lib/validate-processor.ts #1529

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

btlghrants
Copy link
Collaborator

@btlghrants btlghrants commented Dec 6, 2024

Describe what should be investigated or refactored

Refactor of src/lib/validate-processor.ts to reduce complexity warnings:

/pepr/src/lib/validate-processor.ts
  15:8  warning  Async function 'validateProcessor' has a complexity of 13. Maximum allowed is 10  complexity
  62:9  warning  Blocks are nested too deeply (4). Maximum allowed is 3                            max-depth

Additional context

Fixes #1381
In support of #1248

@btlghrants btlghrants self-assigned this Dec 6, 2024
@btlghrants btlghrants added this to the v0.42.0 milestone Dec 6, 2024
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.82%. Comparing base (35bf589) to head (a539362).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/validate-processor.ts 78.26% 4 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1529      +/-   ##
==========================================
+ Coverage   78.97%   79.82%   +0.85%     
==========================================
  Files          40       40              
  Lines        1736     1740       +4     
  Branches      405      413       +8     
==========================================
+ Hits         1371     1389      +18     
+ Misses        335      321      -14     
  Partials       30       30              
Files with missing lines Coverage Δ
src/lib/validate-processor.ts 54.76% <78.26%> (+41.60%) ⬆️

@btlghrants btlghrants marked this pull request as ready for review December 6, 2024 22:49
@btlghrants btlghrants requested a review from a team as a code owner December 6, 2024 22:49
@cmwylie19 cmwylie19 added this pull request to the merge queue Dec 9, 2024
Merged via the queue into main with commit 35024c4 Dec 9, 2024
48 checks passed
@cmwylie19 cmwylie19 deleted the 1381_complex_validate_processor branch December 9, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Refactor complex implementation in validate-processor.ts
2 participants