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 getUsages and parsing-strategy #370

Merged
merged 19 commits into from
Jun 3, 2024

Conversation

BenediktMehl
Copy link
Collaborator

Refactoring in the types and call-expression folders

Issue: #366
Closes: #368

Description

  • Refactored the getUsages method from abstract-collector.
  • Refactored the getTypesFromFile method from types-query-strategy.
  • Added and adjusted some tests. The tests we adjusted may change in the future since some metrics are still to be discussed in detail.

Definition of Done

A PR is only ready for merge once all the following acceptance criteria are fulfilled:

  • All TODOs related to this PR have been closed
  • There are automated tests for newly written code and bug fixes
  • All bugs discovered while working on this PR have been submitted as issues (if not already an open issue)
  • Documentation (README.md, UPDATE_GRAMMARS.md) has been updated

Screenshots or gifs

Copy link

github-actions bot commented May 28, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 95.76% (🎯 90%) 4616 / 4820
🟢 Statements 95.76% (🎯 90%) 4616 / 4820
🟢 Functions 97.32% (🎯 90%) 218 / 224
🟢 Branches 90.54% (🎯 90%) 498 / 550
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/parser/metrics/coupling/call-expression-resolver.ts 74.12% 76.92% 100% 74.12% 43-44, 65-66, 107-115, 118-123, 165-197
src/parser/metrics/coupling/coupling.ts 96.16% 86.95% 93.33% 96.16% 95-96, 223-224, 235-236, 242-243, 255, 269-271
src/parser/resolver/usages-collector.ts 95.23% 66.66% 100% 95.23% 18
src/parser/resolver/call-expressions/abstract-collector.ts 95.85% 90.16% 100% 95.85% 98, 156-157, 228-229, 375-380, 447-453, 477-478
src/parser/resolver/call-expressions/c-sharp-collector.ts 100% 100% 100% 100%
src/parser/resolver/call-expressions/php-collector.ts 100% 100% 100% 100%
src/parser/resolver/types/abstract-collector.ts 84.61% 50% 100% 84.61% 29-34
src/parser/resolver/types/c-sharp-collector.ts 100% 100% 100% 100%
src/parser/resolver/types/php-collector.ts 100% 100% 100% 100%
src/parser/resolver/types/resolver-strategy/types-query-strategy.ts 96.69% 85.71% 100% 96.69% 17-18, 104-105
Generated in workflow #125

@mylinhdao mylinhdao merged commit 7dcb6b9 into main Jun 3, 2024
2 checks passed
@mylinhdao mylinhdao deleted the refactor/366/type-declaration branch June 3, 2024 08:51
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.

refactor type-usage/abstract-collector.ts/getUsages()
3 participants