nufmt icon indicating copy to clipboard operation
nufmt copied to clipboard

Split lib and bin into crates and minor refactoring

Open IogaMaster opened this issue 2 years ago • 1 comments

this will close #48

changelog

  • merge workflows pull_request.yml and main.yml into check_rust.yml
  • remove the benches/ which were very non-mature
  • move tool functions to crates/nufmt/src/lib.rs
  • split code base into nufmt and nufmt_cli inside crates/

Justification

  1. Improved Readability: Decoupling the code into modular packages can enhance code readability. It allows developers to focus on one specific aspect of the code at a time, making it easier to understand.

  2. Reduced Cognitive Load: With decoupled packages, developers don't need to grasp the entire codebase in one go. They can delve into specific modules as needed, reducing the cognitive load and making it more accessible.

  3. Easier Onboarding: When new team members join nufmt, a decoupled codebase makes it easier for them to get up to speed.

  4. Maintainability: A more understandable codebase is inherently more maintainable. Developers can make changes and improvements more confidently, reducing the risk of introducing new issues.

  5. Long-term Viability: A codebase that is hard to understand can become a liability in the long run. By investing in a rewrite now, we can ensure the long-term viability and sustainability of nufmt.

IogaMaster avatar Sep 28 '23 02:09 IogaMaster

Alright all basic functionality is restored in this pr. Please test and let me know what else is in need of changing.

I still need to work on:

  • Setting the CI back up

IogaMaster avatar Sep 28 '23 03:09 IogaMaster

I would close this as this PR didn't see the light in a while. Is it okay @fdncred ?

AucaCoyan avatar Oct 20 '24 13:10 AucaCoyan

ya, it has been a while

fdncred avatar Oct 20 '24 13:10 fdncred