File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
2
cache :
3
3
- cargo
4
+ before_install :
5
+ - MAX_LINE_LENGTH=80 bash ci/check_line_lengths.sh src/**/*.md
4
6
install :
5
7
- source ~/.cargo/env || true
6
8
- bash ci/install.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Checking line lengths in all source files <= $MAX_LINE_LENGTH chars..."
4
+
5
+ echo " Offending files and lines:"
6
+ (( success = 1 ))
7
+ for file in " $@ " ; do
8
+ echo " $file "
9
+ (( line_no = 0 ))
10
+ while IFS=" " read -r line || [[ -n " $line " ]] ; do
11
+ (( line_no++ ))
12
+ if (( "${# line} " > $MAX_LINE_LENGTH )) ; then
13
+ (( success = 0 ))
14
+ echo -e " \t$line_no : $line "
15
+ fi
16
+ done < " $file "
17
+ done
18
+
19
+ (( $success )) && echo " No offending lines found."
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
2
3
set -ex
3
4
4
5
function cargo_install() {
You can’t perform that action at this time.
0 commit comments