diff --git a/.gitattributes b/.gitattributes index a8e0c365fbd1..279ce980bf34 100644 --- a/.gitattributes +++ b/.gitattributes @@ -50,7 +50,7 @@ README* ocaml-typo=missing-header asmcomp/*/emit.mlp ocaml-typo=tab,long-line,unused-prop -asmcomp/power/NOTES.md ocaml-typo=missing-header,long-line +asmcomp/power/NOTES.md ocaml-typo=missing-header asmrun/i386.S ocaml-typo=long-line diff --git a/tools/check-typo b/tools/check-typo index 3c2ef3625fcc..e0bcf53d4c88 100755 --- a/tools/check-typo +++ b/tools/check-typo @@ -222,9 +222,13 @@ IGNORE_DIRS=" } $0 !~ /\t/ && length($0) > 80 { - RSTART = 81; - RLENGTH = 0; - err("long-line", "line is over 80 columns"); + t = $0; + sub(/https?:[A-Za-z0-9._~:/?#\[\]@!$&\047()*+,;=%-]{73,}$/, "", t); + if (length(t) > 80) { + RSTART = 81; + RLENGTH = 0; + err("long-line", "line is over 80 columns"); + } } $0 !~ /\t/ && length($0) > 132 {