refactor existing code to reduce cognitive complexity to 15#599
Conversation
Sakeeb91
left a comment
There was a problem hiding this comment.
Findings
- Blocker (docs):
.gitignorenow ignorestests/FlowSynx.UnitTests/. Any future edits to the unit test project will be hidden locally, making it impossible to update or add tests. Remove this entry before merging. - Blocker (docs): The newly added
.gitignorepattern ignores every.gitignorefile across the repo. This prevents contributors from adding scoped ignore files (e.g., in plugin folders). Drop this line.
Tests
dotnet test(passes; only existing warnings appear)
Recommendation
Keep the Kestrel refactor, but revert the .gitignore additions (move personal exclusions to a global/local ignore) before merge.
ziagham
left a comment
There was a problem hiding this comment.
Please review and resolve the comments.
.gitignore
Outdated
| **/flowsynxresults/ No newline at end of file | ||
| **/flowsynxresults/ | ||
|
|
||
| # Personal settings file for FlowSynx |
There was a problem hiding this comment.
It seems this commit includes unintended or incorrect modifications to the .gitignore file. Please revert those changes and ensure that no updates are committed to this file.
| } | ||
|
|
||
| listenOptions.UseHttps(cert.Path, cert.Password); | ||
| } |
|
@Sakeeb91 |
|
|
@ziagham |
Sakeeb91
left a comment
There was a problem hiding this comment.
- FOSSA check: The GitHub FOSSA gate is still red because the scan does not receive credentials on forked PRs. The job fails with the usual missing-token error (
FOSSA_API_KEYis unavailable for forks). Maintainers will need to rerun the scan after merging or push a branch inside the org to let the check succeed.
Tests
dotnet test(passes; same warnings as on main)
Recommendation
Safe to merge once a maintainer reruns/overrides the external FOSSA compliance check. No additional code changes required.



What type of PR is this? (check all applicable)
Description
Refactored the method to reduce cognitive complexity to ≤15 by simplifying nested logic and improving code readability.
Key changes include:
ifstatements into smaller, dedicated private methods to make the main method more linear and focused.Issue reference
#597
Closes #
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: