Skip to content

Commit a9e929e

Browse files
committed
Truncate long lines
1 parent 7ef5f00 commit a9e929e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/scripts/track_fixmes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ for file in $(find bin dist docs tools etc examples lib test tools -type f); do
3535
lineNumber=$(echo $fixme | cut -d ":" -f 1)
3636
lineContent=$(awk "NR==$lineNumber" $file)
3737
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38+
if [ ${#lineContent} -gt 80 ]; then
39+
lineContent=$(echo $lineContent | cut -c 1-80)
40+
lineContent="$lineContent..."
41+
continue
42+
fi
3843
comment="$comment
3944
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
4045
fi

.github/workflows/scripts/track_todos

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ for file in $(find bin dist docs tools etc examples lib test tools -type f); do
3535
lineNumber=$(echo $todo | cut -d ":" -f 1)
3636
lineContent=$(awk "NR==$lineNumber" $file)
3737
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38+
if [ ${#lineContent} -gt 80 ]; then
39+
lineContent=$(echo $lineContent | cut -c 1-80)
40+
lineContent="$lineContent..."
41+
continue
42+
fi
3843
comment="$comment
3944
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
4045
fi

0 commit comments

Comments
 (0)