Skip to content

Refactor: improve quality, fewer calls to fs.statSync #88

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

Merged
merged 3 commits into from
Jan 9, 2021

Conversation

sgb-io
Copy link
Owner

@sgb-io sgb-io commented Jan 9, 2021

  • Refactored core logic to remove some un-neccessary calls to fs.statSync (we already had the data in the logic)
  • Split apart util into smaller, focused utils
  • Move some top level code into utils
  • Relocated a type into the types file
  • Reduced some duplication around excluding directories/files
  • Simplified logic around dot files / dirs. Also patched a missing case from before, although I have not tested this before/after the change.

New codehawk scores:

  • Average: 54.30 => 56.28 (+1.98)
  • Worst: 45.24 => 46.65 (+1.41)

Relevant to #85

sgb-io added 3 commits January 9, 2021 11:35
Removed some `fs` calls that were not logically needed, split apart the utils into smalle r, separate pieces
@sgb-io sgb-io merged commit 26fa23f into master Jan 9, 2021
@sgb-io sgb-io deleted the feat/refactor-improve-quality branch January 9, 2021 11:56
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.

1 participant