KEMBAR78
refactor: divide code into 2 crates: `dotenv-lookup` & `dotenv-linter` by mgrachev · Pull Request #620 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

@mgrachev
Copy link
Member

@mgrachev mgrachev commented Jan 3, 2023

Dividing the project into separate crates:

  • Move the logic related to finding and parsing .env files to the dotenv-lookup crate
  • Move the logic related to linting .env files to the dotenv-linter crate
  • Combine crates into one workspace

✔ Checklist:

  • Commit messages have been written in Conventional Commits format;
  • Tests for the changes have been added (for bug fixes / features);
  • Docs have been added / updated on the dotenv-linter.github.io (for bug fixes / features).

@mgrachev mgrachev requested a review from a team January 3, 2023 12:49
@mgrachev mgrachev force-pushed the divide-into-crates branch from a2dc315 to ce5d527 Compare January 3, 2023 21:53
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2023

Codecov Report

Merging #620 (126f2b4) into master (c00515e) will increase coverage by 0.00%.
The diff coverage is 98.56%.

❗ Current head 126f2b4 differs from pull request most recent head b79f71f. Consider uploading reports for the commit b79f71f to get more accurate results

@@           Coverage Diff           @@
##           master     #620   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files          44       46    +2     
  Lines        2814     2835   +21     
=======================================
+ Hits         2789     2810   +21     
  Misses         25       25           
Impacted Files Coverage Δ
dotenv-linter/src/checks/duplicated_key.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/ending_blank_line.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/extra_blank_line.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/incorrect_delimiter.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/key_without_value.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/leading_character.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/lowercase_key.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/quote_character.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/space_character.rs 100.00% <ø> (ø)
dotenv-linter/src/checks/substitution_key.rs 100.00% <ø> (ø)
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mgrachev mgrachev force-pushed the divide-into-crates branch 4 times, most recently from 69c998f to 92807fe Compare January 5, 2023 09:06
@mgrachev mgrachev changed the title refactor: move logic to another crate refactor: divide code into 2 crates: dotenv-lookup & dotenv-linter Jan 5, 2023
@mgrachev mgrachev force-pushed the divide-into-crates branch 2 times, most recently from 6267f65 to 5079681 Compare January 5, 2023 13:31
@mgrachev mgrachev requested a review from DDtKey January 5, 2023 14:05
.gitignore Outdated
# Generated by Cargo
# will have compiled files and executables
/target/
/dotenv-lookup/target/
Copy link
Member

@DDtKey DDtKey Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's not needed with workspace, because it shares target folder. Is not?

@@ -0,0 +1,57 @@
[package]
name = "dotenv-linter"
version.workspace = true
Copy link
Member

@DDtKey DDtKey Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep the same version for these crates? I don't mind, just wondering, because I guess dotenv-lookup would require much less updates then dotenv-linter, so it will publish not-changed crate for each release 🤔

Moreover it could lead to the next situation: we need to create major release for lookup, and it will force us to make the same for dotenv-linter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, agree. Let's start from v1.0.0. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. yes

DDtKey
DDtKey previously approved these changes Jan 5, 2023
Copy link
Member

@DDtKey DDtKey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments, but in general I don't mind of merging as it is.

Thank you for these changes!

@mgrachev mgrachev force-pushed the divide-into-crates branch 4 times, most recently from 19ef423 to 126f2b4 Compare January 5, 2023 17:27
dotenv-lookup & dotenv-linter

Signed-off-by: Mikhail Grachev <work@mgrachev.com>
@mgrachev mgrachev force-pushed the divide-into-crates branch from 126f2b4 to b79f71f Compare January 5, 2023 17:41
@mgrachev mgrachev merged commit 933630e into master Jan 5, 2023
@mgrachev mgrachev deleted the divide-into-crates branch January 5, 2023 18:01
@mgrachev mgrachev mentioned this pull request Aug 6, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants