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

Improve diff while running test-fix #157

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Conversation

carusogabriel
Copy link
Contributor

Previously, the make test-fix outputed something like:

diff tests/input2/array_indentation.php tests/fixed/array_indentation.php
14c14
< $multiArray = [
---
> $multiArray =[
Only in tests/fixed: single-line-array-spacing.php~
make: *** [test-fix] Error 1

Now, using diff -u, we have a Git like diff, much easier to understand:

diff -u tests/input2/array_indentation.php tests/fixed/array_indentation.php
--- tests/input2/array_indentation.php	2020-02-04 22:19:28.000000000 -0300
+++ tests/fixed/array_indentation.php	2020-02-04 22:16:04.000000000 -0300
@@ -11,7 +11,7 @@
     5,
 ];

-$multiArray = [
+$multiArray =[
     '0' => [
         '2' => 2,
         1 => '1',
Only in tests/fixed: single-line-array-spacing.php~
make: *** [test-fix] Error 1

Previously, the `make test-fix` outputed something like:

```sh
diff tests/input2/array_indentation.php tests/fixed/array_indentation.php
14c14
< $multiArray = [
---
> $multiArray =[
Only in tests/fixed: single-line-array-spacing.php~
make: *** [test-fix] Error 1
```

Now, using `diff -u`, we have a Git like diff, much easier to understand:

```sh
diff -u tests/input2/array_indentation.php tests/fixed/array_indentation.php
--- tests/input2/array_indentation.php	2020-02-04 22:19:28.000000000 -0300
+++ tests/fixed/array_indentation.php	2020-02-04 22:16:04.000000000 -0300
@@ -11,7 +11,7 @@
     5,
 ];

-$multiArray = [
+$multiArray =[
     '0' => [
         '2' => 2,
         1 => '1',
Only in tests/fixed: single-line-array-spacing.php~
make: *** [test-fix] Error 1
```
@carusogabriel carusogabriel added this to the 8.0.0 milestone Feb 5, 2020
@carusogabriel carusogabriel requested a review from a team February 5, 2020 01:24
@alcaeus alcaeus merged commit 2c20ec6 into master Feb 5, 2020
@alcaeus alcaeus deleted the chore/diffs-with-line-numbers branch February 5, 2020 08:14
@alcaeus
Copy link
Member

alcaeus commented Feb 5, 2020

Thanks @carusogabriel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants