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 Flags.validate in src/flags.js #29

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

tu2463
Copy link

@tu2463 tu2463 commented Sep 25, 2024

Refactor Flags.validate() in src/flag.js to reduce its Cognitive Complexity by adding a helper function 'checkSelfFlagError' to replace a nested function and an optional chaining to remove unnecessary checks.
Also added test cases for the refactored code.
Recreated the PR after removing the dump.rdb file, which has merge conflict with the main branch.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11025618051

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 82.707%

Totals Coverage Status
Change from base Build 11025447208: 0.04%
Covered Lines: 22339
Relevant Lines: 25593

💛 - Coveralls

@tu2463 tu2463 merged commit e90b966 into f24 Sep 25, 2024
1 check passed
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.

2 participants