Skip to content

Commit df55a37

Browse files
committed
revert change for check new lines and add new lines to tests
1 parent 52302be commit df55a37

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/pr-code-format.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ jobs:
2121

2222
- name: Check Newline at End of File
2323
run: |
24-
# Get list of changed files
25-
CHANGED_FILES=$(git diff --name-only --diff-filter=ACM origin/master...HEAD --)
26-
CHANGED_CPP_FILES=$(echo "$CHANGED_FILES" | (grep -E '^(common|runtime|runtime-common|runtime-light)/.*\.(cpp|hpp|h|inl)$' || :; ))
27-
2824
EXIT_CODE=0
29-
for file in $CHANGED_CPP_FILES; do
25+
for file in $(git grep --cached -I --files-with-matches ''); do
3026
if [[ $(tail -c 1 "$file") ]]; then
3127
echo "Missing new line at end of file '$file'"
3228
EXIT_CODE=1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hello+world+
1+
hello+world+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
duplicate+hello+test+world+
1+
duplicate+hello+test+world+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hello+world+
1+
hello+world+

0 commit comments

Comments
 (0)