KEMBAR78
EndingBlankLines checker by evgeniy-r · Pull Request #170 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

evgeniy-r
Copy link
Contributor

@evgeniy-r evgeniy-r commented May 1, 2020

I have added the required check.
I check only the last one character and it seems that it is enough (however, it is easy to add more sequences of characters).

✔ Checklist:

  • This PR has been added to CHANGELOG.md (at the top of the list);
  • Tests for the changes have been added (for bug fixes / features);
  • Docs have been added / updated (for bug fixes / features).

@codecov-io
Copy link

codecov-io commented May 1, 2020

Codecov Report

Merging #170 into master will increase coverage by 0.03%.
The diff coverage is 97.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   97.46%   97.50%   +0.03%     
==========================================
  Files          12       13       +1     
  Lines         948     1043      +95     
==========================================
+ Hits          924     1017      +93     
- Misses         24       26       +2     
Impacted Files Coverage Δ
src/checks/ending_blank_line.rs 91.42% <91.42%> (ø)
src/checks.rs 100.00% <100.00%> (ø)
src/common.rs 97.54% <100.00%> (+0.47%) ⬆️
src/lib.rs 94.73% <100.00%> (+2.54%) ⬆️
src/checks/unordered_key.rs 100.00% <0.00%> (ø)
src/checks/duplicated_key.rs 100.00% <0.00%> (ø)
src/checks/incorrect_delimiter.rs 96.34% <0.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f13c64c...daf2066. Read the comment docs.

@mgrachev
Copy link
Member

mgrachev commented May 2, 2020

@evgeniy-r Thank you for your contribution! 🚀

I need more time to review your PR.

@mgrachev mgrachev linked an issue May 2, 2020 that may be closed by this pull request
@evgeniy-r
Copy link
Contributor Author

I have examined the issue one more time, and now I think that can solve this with less number of changes.
I think that we can just check that the last element of the lines collection in checks::run is blank.
I can update PR, if it is a good idea.

@mgrachev
Copy link
Member

mgrachev commented May 4, 2020

If you can do it, then please do.

@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch 8 times, most recently from 2dc1ce1 to 5c42ed2 Compare May 4, 2020 20:47
@evgeniy-r
Copy link
Contributor Author

It is ready, take a look, please.

@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch from 825f068 to 9d859d7 Compare May 4, 2020 21:08
@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch from 9d859d7 to 4a86cee Compare May 8, 2020 15:35
@evgeniy-r
Copy link
Contributor Author

evgeniy-r commented May 8, 2020

I have rebase it on the updated master branch because of conflicts.

Copy link
Member

@mgrachev mgrachev left a comment

Choose a reason for hiding this comment

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

I have left some comments. Could you please look at them?

@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch 3 times, most recently from fb0ec45 to b6d8b52 Compare May 10, 2020 18:53
@mgrachev mgrachev added the feature New feature or request label May 11, 2020
@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch 3 times, most recently from 5ae7f59 to 8038f4d Compare May 11, 2020 12:03
Copy link
Member

@mgrachev mgrachev left a comment

Choose a reason for hiding this comment

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

Why have you done these changes?
tests/cli_common.rs → tests/cli_common/mod.rs

@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch from 8038f4d to 36ddfb6 Compare May 11, 2020 14:46
@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch from 36ddfb6 to 943919e Compare May 11, 2020 14:48
@evgeniy-r
Copy link
Contributor Author

Why have you done these changes?
tests/cli_common.rs → tests/cli_common/mod.rs

Because cli_common.rs itself is not a test, it is a shared module. This is not a mandatory change, but it will be more clear.

https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-tests

@evgeniy-r evgeniy-r force-pushed the feat/152/end-of-file-nl branch from 943919e to daf2066 Compare May 12, 2020 05:52
@mgrachev mgrachev merged commit 05325b3 into dotenv-linter:master May 12, 2020
@mgrachev
Copy link
Member

@evgeniy-r Excellent work! Thank you! 🔥

@evgeniy-r evgeniy-r deleted the feat/152/end-of-file-nl branch May 15, 2020 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Development

Successfully merging this pull request may close these issues.

Please add a newline at end of file check

3 participants