From 0139db2f4458f75a35140948d12c6700c3fd1e9f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 12:12:47 +0000 Subject: [PATCH 1/2] expand verify-docs to check all src/ files for CRLF and missing final newline; fix non-compliant files Agent-Logs-Url: https://github.com/eisenwave/cpp-proposals/sessions/da2373aa-05a1-47a2-83d9-575b4cc50bbe Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com> --- scripts/verify-docs.sh | 16 +++++++ src/array-layout.bs | 2 +- src/bitint-lewg-slides.cow | 2 +- src/constexpr-to-string.bs | 2 +- src/icon/css.svg | 12 ++--- src/icon/go.svg | 90 +++++++++++++++++++------------------- src/icon/javascript.svg | 8 ++-- src/icon/julia.svg | 2 +- src/icon/kotlin.svg | 62 +++++++++++++------------- src/icon/python.svg | 2 +- src/icon/rust.svg | 2 +- src/icon/swift.svg | 2 +- src/icon/typescript.svg | 8 ++-- src/modular-arithmetic.bs | 2 +- 14 files changed, 114 insertions(+), 98 deletions(-) diff --git a/scripts/verify-docs.sh b/scripts/verify-docs.sh index 3272877..28c255e 100755 --- a/scripts/verify-docs.sh +++ b/scripts/verify-docs.sh @@ -3,6 +3,7 @@ # produced by the currently installed cowel for every source file whose # version comment matches the installed version. # Also rejects trailing whitespace and literal tab characters in all .cow files. +# Also rejects CRLF line terminators and missing final newlines in all src/ files. # # Usage: scripts/verify-docs.sh # Run from the repository root. @@ -12,6 +13,21 @@ set -e version=$(cowel --version) failed=0 +# Check all src/ files for CRLF line terminators and missing final newline. +while IFS= read -r src; do + if grep -Pq $'\r' "$src" 2>/dev/null; then + echo "CRLF: $src contains CRLF line terminators" + failed=1 + fi + if [ -s "$src" ]; then + last=$(tail -c 1 "$src" | od -An -tx1 | tr -d ' \n') + if [ "$last" != "0a" ] && [ "$last" != "" ]; then + echo "NO_FINAL_NL: $src does not end with a newline" + failed=1 + fi + fi +done < <(find src/ -type f) + # Check all .cow sources for trailing whitespace and tab characters. while IFS= read -r src; do if grep -Pq '\t' "$src"; then diff --git a/src/array-layout.bs b/src/array-layout.bs index ba3e472..64ed395 100644 --- a/src/array-layout.bs +++ b/src/array-layout.bs @@ -250,4 +250,4 @@ W.I.P.
 {
 }
-
\ No newline at end of file + diff --git a/src/bitint-lewg-slides.cow b/src/bitint-lewg-slides.cow index 9cf56ff..a1f7af4 100644 --- a/src/bitint-lewg-slides.cow +++ b/src/bitint-lewg-slides.cow @@ -137,4 +137,4 @@ integral types \li{\em{very surprising} if \tcode{std::is_integral_v<_BitInt(N)>} was \tcode{false}} \li{huge wording/teaching effort to treat \tcode{_BitInt(N)} specially} } -} \ No newline at end of file +} diff --git a/src/constexpr-to-string.bs b/src/constexpr-to-string.bs index b22cc65..fa686f2 100644 --- a/src/constexpr-to-string.bs +++ b/src/constexpr-to-string.bs @@ -293,4 +293,4 @@ Update subclause 23.4.5 [string.conversions] as follows: "href": "https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2587r3.html#biblio-codesearch" } } - \ No newline at end of file + diff --git a/src/icon/css.svg b/src/icon/css.svg index ce5eb76..0bbea83 100644 --- a/src/icon/css.svg +++ b/src/icon/css.svg @@ -1,6 +1,6 @@ - - CSS Logo - A purple square with rounded corners and the letters CSS inside in white - - - \ No newline at end of file + + CSS Logo + A purple square with rounded corners and the letters CSS inside in white + + + diff --git a/src/icon/go.svg b/src/icon/go.svg index 5625a85..2c927f8 100644 --- a/src/icon/go.svg +++ b/src/icon/go.svg @@ -1,45 +1,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icon/javascript.svg b/src/icon/javascript.svg index d19a6a5..9623cd9 100644 --- a/src/icon/javascript.svg +++ b/src/icon/javascript.svg @@ -1,4 +1,4 @@ - - - - \ No newline at end of file + + + + diff --git a/src/icon/julia.svg b/src/icon/julia.svg index 3dd6834..f4e389f 100644 --- a/src/icon/julia.svg +++ b/src/icon/julia.svg @@ -1 +1 @@ - + diff --git a/src/icon/kotlin.svg b/src/icon/kotlin.svg index a53eafe..e64e054 100644 --- a/src/icon/kotlin.svg +++ b/src/icon/kotlin.svg @@ -1,31 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icon/python.svg b/src/icon/python.svg index 70ddc10..38ea8ad 100644 --- a/src/icon/python.svg +++ b/src/icon/python.svg @@ -1 +1 @@ - + diff --git a/src/icon/rust.svg b/src/icon/rust.svg index 8ecd86f..28dd179 100644 --- a/src/icon/rust.svg +++ b/src/icon/rust.svg @@ -1 +1 @@ - + diff --git a/src/icon/swift.svg b/src/icon/swift.svg index 2148060..382b9e6 100644 --- a/src/icon/swift.svg +++ b/src/icon/swift.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/icon/typescript.svg b/src/icon/typescript.svg index a98ddea..520f042 100644 --- a/src/icon/typescript.svg +++ b/src/icon/typescript.svg @@ -1,4 +1,4 @@ - - - - \ No newline at end of file + + + + diff --git a/src/modular-arithmetic.bs b/src/modular-arithmetic.bs index 4d3e9e4..c6d1313 100644 --- a/src/modular-arithmetic.bs +++ b/src/modular-arithmetic.bs @@ -243,4 +243,4 @@ Note: The name of the subclause is based on [meta.trans.sign], sign modification
 {
 }
-
\ No newline at end of file + From f6b494baed3a7327cdc47f69f1c27d687cd07284 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 12:13:47 +0000 Subject: [PATCH 2/2] simplify final-newline check: remove redundant empty-string guard Agent-Logs-Url: https://github.com/eisenwave/cpp-proposals/sessions/da2373aa-05a1-47a2-83d9-575b4cc50bbe Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com> --- scripts/verify-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-docs.sh b/scripts/verify-docs.sh index 28c255e..dc69559 100755 --- a/scripts/verify-docs.sh +++ b/scripts/verify-docs.sh @@ -21,7 +21,7 @@ while IFS= read -r src; do fi if [ -s "$src" ]; then last=$(tail -c 1 "$src" | od -An -tx1 | tr -d ' \n') - if [ "$last" != "0a" ] && [ "$last" != "" ]; then + if [ "$last" != "0a" ]; then echo "NO_FINAL_NL: $src does not end with a newline" failed=1 fi