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

Handles folders with spaces #131

Merged
merged 3 commits into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ exit_code=0
src_files=$(find "$CHECK_PATH" -name .git -prune -o -regextype posix-egrep -regex "$INCLUDE_REGEX" -print)

# check formatting in each source file
IFS=$'\n' # Loop below should separate on new lines, not spaces.
for file in $src_files; do
# Only check formatting if the path doesn't match the regex
if ! [[ ${file} =~ $EXCLUDE_REGEX ]]; then
Expand Down
17 changes: 17 additions & 0 deletions test/known_pass/folder/with spaces/addition.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Addition program */
#include <stdio.h>

main()
{
int integer1, integer2,
sum; /* declaration before any executable statements*/

printf("Enter first integer\n"); /* prompt */
scanf("%d", &integer1); /* read an integer */
printf("Enter second integer\n"); /* prompt */
scanf("%d", &integer2); /* read an integer */
sum = integer1 + integer2; /* assignment of sum */
printf("Sum is %d\n", sum); /* print sum */

return 0; /* Indicate program ended successfully */
}