KEMBAR78
Feature: Support export prefix (#337) by skonik · Pull Request #340 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

skonik
Copy link
Contributor

@skonik skonik commented Nov 3, 2020

General description

This PR adds export prefix support for .env files.
Original proposal topic: #337

Before:
$ echo "export SUPPORT_EXPORT_PREFIX=true" > .env
$ cargo run .
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/dotenv-linter .`
Checking .env
.env:1 IncorrectDelimiter: The export SUPPORT_EXPORT_PREFIX key has incorrect delimiter
.env:1 LowercaseKey: The export SUPPORT_EXPORT_PREFIX key should be in uppercase

Found 2 problems
After:
$ echo "export SUPPORT_EXPORT_PREFIX=true" > .env
$ cargo run .
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/dotenv-linter .`
Checking .env

No problems found

✔ Checklist:

@skonik skonik changed the title add stripping export prefix add export prefix support Nov 3, 2020
@skonik skonik changed the title add export prefix support feat: Support export prefix (#333) Nov 3, 2020
@skonik skonik marked this pull request as ready for review November 3, 2020 13:40
@skonik skonik changed the title feat: Support export prefix (#333) Feature: Support export prefix (#333) Nov 3, 2020
@skonik skonik changed the title Feature: Support export prefix (#333) Feature: Support export prefix (#337) Nov 3, 2020
@mgrachev mgrachev linked an issue Nov 7, 2020 that may be closed by this pull request
@mgrachev mgrachev added this to the v3.0.0 milestone Nov 7, 2020
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.

@skonik 👋 Thank you for your contribution! 🚀

I have left some comments. Please look at them 👀

@mgrachev
Copy link
Member

mgrachev commented Nov 7, 2020

Why this file is needed bin/dotenv-linter?

@mgrachev
Copy link
Member

mgrachev commented Nov 7, 2020

Also, please add tests for these checks:

  • IncorrectDelimiter
  • LowercaseKey

@mgrachev
Copy link
Member

mgrachev commented Nov 7, 2020

Also, please add information about this feature to dotenv-linter.github.io.

@mgrachev mgrachev requested a review from a team November 7, 2020 18:33
@codecov-io
Copy link

codecov-io commented Nov 9, 2020

Codecov Report

Merging #340 (5fcc90b) into master (8d38055) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
+ Coverage   97.07%   97.11%   +0.03%     
==========================================
  Files          33       34       +1     
  Lines        2363     2358       -5     
==========================================
- Hits         2294     2290       -4     
+ Misses         69       68       -1     
Impacted Files Coverage Δ
src/common/line_entry.rs 96.00% <100.00%> (+0.28%) ⬆️
src/main.rs 82.14% <0.00%> (-10.17%) ⬇️
src/lib.rs 100.00% <0.00%> (ø)
src/common.rs 100.00% <0.00%> (ø)
src/common/output.rs
src/common/output/check.rs 100.00% <0.00%> (ø)
src/common/output/fix.rs 100.00% <0.00%> (ø)
src/common/warning.rs 90.32% <0.00%> (+1.86%) ⬆️

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 8d38055...5fcc90b. Read the comment docs.

@skonik
Copy link
Contributor Author

skonik commented Nov 10, 2020

Also, please add information about this feature to dotenv-linter.github.io.

Check please dotenv-linter/dotenv-linter.github.io#14

@mgrachev mgrachev merged commit 794fce7 into dotenv-linter:master Nov 10, 2020
@mgrachev
Copy link
Member

@skonik Great job! 🦀 Thank you! 👍

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.

Support export prefix?

3 participants