about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2024-03-30 17:46:30 +0100
committerGitHub <noreply@github.com>2024-03-30 17:46:30 +0100
commit3da49452e09bfa9a9841b7877140677f6ee2e728 (patch)
tree0b882d763cefaebd4f9192bc242fdefe6e26346b /src/doc/rustc-dev-guide/ci
parent3b787cfdcbec4dfad40ad9b48704d912311103b4 (diff)
Delete length check (#1952)
It's super annoying to be forced to use this bad convention, and
apparently everyone agrees. The only reason no improvements have been
done is because those were blocked on writing a better checker.

I strongly believe that no checker is better than a bad checker, so
let's just delete it in the meantime. I kindly asked anyone who sees
this to complain about overly long sentences in review in the future, I
think we can make this turn out fine.
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
-rwxr-xr-xsrc/doc/rustc-dev-guide/ci/lengthcheck.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/doc/rustc-dev-guide/ci/lengthcheck.sh b/src/doc/rustc-dev-guide/ci/lengthcheck.sh
deleted file mode 100755
index 76d677be74b..00000000000
--- a/src/doc/rustc-dev-guide/ci/lengthcheck.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-# Check files for lines that are too long.
-
-if [ "$1" == "--help" ]; then
-  echo 'Usage:' "[MAX_LINE_LENGTH=n] $0 [file ...]"
-  exit 1
-fi
-
-if [ "$MAX_LINE_LENGTH" == "" ]; then
-    MAX_LINE_LENGTH=100
-fi
-
-if [ "$1" == "" ]; then
-  files=( src/*.md src/*/*.md src/*/*/*.md )
-else
-  files=( "$@" )
-fi
-
-echo "Checking line lengths in all source files <= $MAX_LINE_LENGTH chars..."
-
-echo "Offending files and lines:"
-(( bad_lines = 0 ))
-(( inside_block = 0 ))
-for file in "${files[@]}"; do
-  (( line_no = 0 ))
-  while IFS="" read -r line || [[ -n "$line" ]] ; do
-    (( line_no++ ))
-    if [[ "$line" =~ ^'```' ]] ; then
-      (( inside_block = !$inside_block ))
-      continue
-    fi
-    if ! (( $inside_block )) \
-        && ! [[ "$line" =~ " | "|"-|-"|"://"|"]:"|\[\^[^\ ]+\]: ]] \
-        && (( "${#line}" > $MAX_LINE_LENGTH )) ; then
-      (( bad_lines++ ))
-      echo -e "\t$file:$line_no : $line"
-    fi
-  done < "$file"
-done
-
-echo "$bad_lines offending lines found."
-(( $bad_lines == 0 ))