Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore white space parameter --ignore-whitepsace, -W #267

Merged
merged 12 commits into from
Mar 18, 2022

Conversation

scolladon
Copy link
Owner

@scolladon scolladon commented Mar 17, 2022

What does this pull request contains


  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

Explain your changes


Fix --word-diff-regex by setting it to the default git value : --word-diff-regex=|[^[:space:]]
use git diff --numstat with --no-renames and --diff-filter=ADM instead of --name-status in order to solve the issue with -W parameter not being applied with --name-status

Add unit test to avoid future regression
Improve test coverage

Does this close any currently open issues?


closes #262

  • Jest test to check the fix is applied are added.

Any particular element to being able to test locally


Use the branch issue/262 to test the fix from the reproduction playground

Any other comments?


Can be shipped in the next release

Where has this been tested?


Operating System: Darwin Kernel Version 19.6.0: Thu Jan 13 01:26:33 PST 2022; root:xnu-6153.141.51~3/RELEASE_X86_64

yarn version: 1.22.15

node version: v14.19.0

git version: 2.35.1

sfdx version: sfdx-cli/7.142.1 darwin-x64 node-v14.19.0

sgd plugin version: 5.0.2

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #267 (5ef3347) into main (b632446) will increase coverage by 1.36%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main      #267      +/-   ##
===========================================
+ Coverage   98.63%   100.00%   +1.36%     
===========================================
  Files          22        22              
  Lines         585       598      +13     
===========================================
+ Hits          577       598      +21     
+ Misses          8         0       -8     
Impacted Files Coverage Δ
src/service/customObjectHandler.js 100.00% <ø> (ø)
src/service/inFileHandler.js 100.00% <100.00%> (+3.84%) ⬆️
src/service/standardHandler.js 100.00% <100.00%> (+5.26%) ⬆️
src/utils/cliHelper.js 100.00% <100.00%> (+3.33%) ⬆️
src/utils/gitConstants.js 100.00% <100.00%> (ø)
src/utils/repoGitDiff.js 100.00% <100.00%> (ø)

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 febaa9f...5ef3347. Read the comment docs.

@scolladon scolladon changed the title feat: add default --word-diff-regex fix: ignore white space parameter --ignore-whitepsace, -W Mar 18, 2022
@scolladon scolladon enabled auto-merge (squash) March 18, 2022 09:20
@scolladon scolladon disabled auto-merge March 18, 2022 11:32
@scolladon scolladon force-pushed the fix/ignore-whitespace-word-diff-regex-overfiltering branch from ffd81ca to 5ef3347 Compare March 18, 2022 11:50
@codeclimate
Copy link

codeclimate bot commented Mar 18, 2022

Code Climate has analyzed commit 5ef3347 and detected 0 issues on this pull request.

View more on Code Climate.

@scolladon scolladon enabled auto-merge (squash) March 18, 2022 11:51
@scolladon scolladon merged commit d9f560e into main Mar 18, 2022
@scolladon scolladon deleted the fix/ignore-whitespace-word-diff-regex-overfiltering branch March 18, 2022 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--ignore-whitespace ignores everything instead
2 participants