-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* jk/test: enable whitespace checking of test scripts avoid trailing whitespace in zero-change diffstat lines avoid whitespace on empty line in automatic usage message mask necessary whitespace policy violations in test scripts fix whitespace violations in test scripts
- Loading branch information
Showing
17 changed files
with
153 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
t[0-9][0-9][0-9][0-9]-*.sh -whitespace | ||
t[0-9][0-9][0-9][0-9]/* -whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/main.c b/main.c | ||
new file mode 100644 | ||
--- /dev/null | ||
+++ b/main.c | ||
@@ -0,0 +1,23 @@ | ||
+#include <stdio.h> | ||
+ | ||
+int func(int num); | ||
+void print_int(int num); | ||
+ | ||
+int main() { | ||
+ int i; | ||
+ | ||
+ for (i = 0; i < 10; i++) { | ||
+ print_int(func(i)); | ||
+ } | ||
+ | ||
+ return 0; | ||
+} | ||
+ | ||
+int func(int num) { | ||
+ return num * num; | ||
+} | ||
+ | ||
+void print_int(int num) { | ||
+ printf("%d", num); | ||
+} | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/main.c b/main.c | ||
--- a/main.c | ||
+++ b/main.c | ||
@@ -1,7 +1,9 @@ | ||
+#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
void print_int(int num); | ||
+void print_ln(); | ||
|
||
int main() { | ||
int i; | ||
@@ -10,6 +12,8 @@ | ||
print_int(func(i)); | ||
} | ||
|
||
+ print_ln(); | ||
+ | ||
return 0; | ||
} | ||
|
||
@@ -21,3 +25,7 @@ | ||
printf("%d", num); | ||
} | ||
|
||
+void print_ln() { | ||
+ printf("\n"); | ||
+} | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cat > patch3.patch <<\EOF | ||
diff --git a/main.c b/main.c | ||
--- a/main.c | ||
+++ b/main.c | ||
@@ -1,9 +1,7 @@ | ||
-#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
void print_int(int num); | ||
-void print_ln(); | ||
|
||
int main() { | ||
int i; | ||
@@ -12,8 +10,6 @@ | ||
print_int(func(i)); | ||
} | ||
|
||
- print_ln(); | ||
- | ||
return 0; | ||
} | ||
|
||
@@ -25,7 +21,3 @@ | ||
printf("%d", num); | ||
} | ||
|
||
-void print_ln() { | ||
- printf("\n"); | ||
-} | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/main.c b/main.c | ||
--- a/main.c | ||
+++ b/main.c | ||
@@ -1,13 +1,14 @@ | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
-void print_int(int num); | ||
+int func2(int num); | ||
|
||
int main() { | ||
int i; | ||
|
||
for (i = 0; i < 10; i++) { | ||
- print_int(func(i)); | ||
+ printf("%d", func(i)); | ||
+ printf("%d", func3(i)); | ||
} | ||
|
||
return 0; | ||
@@ -17,7 +18,7 @@ | ||
return num * num; | ||
} | ||
|
||
-void print_int(int num) { | ||
- printf("%d", num); | ||
+int func2(int num) { | ||
+ return num * num * num; | ||
} | ||
|
Oops, something went wrong.