KEMBAR78
feat: add support for multi-line single-quoted values by DDtKey · Pull Request #450 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

@DDtKey
Copy link
Member

@DDtKey DDtKey commented Nov 20, 2021

Proof of concept for real multi-line value support #442.
It's temporary ugly solution, but it works.

Currently, I have added support of real multiline single-quoted values.
This implementation allows us to perform all checks on such values, since they are transformed into one LineEntry.

@dotenv-linter/core I suggest to consider this PR and, if approved, add support of multiline double-quoted values in another pull request (if needed at all) 🤔

Partially closes #442

✔ Checklist:

  • Commit messages have been written in Conventional Commits format;
  • 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 on the dotenv-linter.github.io (for bug fixes / features).

@DDtKey DDtKey marked this pull request as draft November 20, 2021 21:37
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2021

Codecov Report

Merging #450 (25cd237) into master (217a066) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #450      +/-   ##
==========================================
- Coverage   98.88%   98.86%   -0.02%     
==========================================
  Files          40       40              
  Lines        2611     2654      +43     
==========================================
+ Hits         2582     2624      +42     
- Misses         29       30       +1     
Impacted Files Coverage Δ
src/checks/substitution_key.rs 100.00% <ø> (ø)
src/fixes/substitution_key.rs 98.14% <ø> (-0.04%) ⬇️
src/common.rs 100.00% <100.00%> (ø)
src/common/line_entry.rs 100.00% <100.00%> (ø)
src/fixes.rs 91.94% <100.00%> (-0.63%) ⬇️
src/fixes/unordered_key.rs 100.00% <100.00%> (ø)
src/lib.rs 98.29% <100.00%> (+0.42%) ⬆️
src/fs_utils.rs 95.40% <0.00%> (-0.06%) ⬇️

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 217a066...25cd237. Read the comment docs.

@DDtKey DDtKey changed the title feat: add support for multi-line value (PoC) feat: add support for multi-line value Nov 24, 2021
@github-actions
Copy link

Benchmark for 116c5e6

Click to view benchmark
Test PR Benchmark Master Benchmark %
dotenv_linter check 65.2±4.26µs 70.8±25.25µs -7.91%
dotenv_linter compare 56.6±3.74µs 59.0±7.15µs -4.07%
dotenv_linter fix 197.7±51.08µs 212.5±92.80µs -6.96%
dotenv_linter fix with backup 273.1±138.53µs 282.0±118.29µs -3.16%

@DDtKey DDtKey changed the title feat: add support for multi-line value feat: add support for multi-line single-quoted values Nov 24, 2021
@dotenv-linter dotenv-linter deleted a comment from github-actions bot Nov 24, 2021
@dotenv-linter dotenv-linter deleted a comment from github-actions bot Nov 24, 2021
@dotenv-linter dotenv-linter deleted a comment from github-actions bot Nov 24, 2021
@dotenv-linter dotenv-linter deleted a comment from github-actions bot Nov 24, 2021
@DDtKey DDtKey marked this pull request as ready for review November 24, 2021 12:09
@github-actions
Copy link

Benchmark for 6bd345b

Click to view benchmark
Test PR Benchmark Master Benchmark %
dotenv_linter check 67.1±13.48µs 68.3±4.63µs -1.76%
dotenv_linter compare 54.9±2.84µs 51.5±2.53µs +6.60%
dotenv_linter fix 191.0±69.21µs 188.9±37.72µs +1.11%
dotenv_linter fix with backup 245.6±116.42µs 255.1±124.97µs -3.72%

@mgrachev mgrachev merged commit 40969ff into master Nov 28, 2021
@mgrachev mgrachev deleted the multiline-value branch November 28, 2021 10:22
@mgrachev
Copy link
Member

@DDtKey Thanks a lot 👍

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.

Real multiple line problem

3 participants