From 831b864135002444669be4b3db58ce599a8b54f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 5 Sep 2026 12:03:33 -0400 Subject: [PATCH] style: Strip stray control characters instead of excluding files The editorconfig-checker bump to v3.11.3 (#7459) added a pre-decode binary-detection check that flags a file as binary, and thus failing the utf-8 charset check, if it contains any C0 control byte. Four files were marked charset = unset as a workaround. Per the discussion in #7888, three of them hold no meaning in those bytes and are better cleaned up: - raster/r.drain/README and scripts/r.drain/README contain a stray CAN (0x18) inside "that differ a little from r.drain". - lib/external/ccmath/C01-matrix contains a DC3/SYN pair acting as a subscript toggle around "U1"; the same matrix is spelled U1 plainly everywhere else in that file. Only configure still needs the exception: its BEL byte is a legitimate awk field separator in autoconf-generated code. Closes #7888 --- .editorconfig | 10 ++++------ lib/external/ccmath/C01-matrix | 4 ++-- raster/r.drain/README | 2 +- scripts/r.drain/README | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index fdafd76c3cf..1993143df5c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -153,10 +153,8 @@ end_of_line = unset charset = unset insert_final_newline = unset -# These are valid UTF-8 text but contain a few stray control characters that -# editorconfig-checker's binary detection flags as non-utf-8. -# configure is autoconf-generated and uses BEL (\007) as an awk field -# separator; lib/external/ccmath is vendored third-party code; the two -# r.drain READMEs are historical, pre-existing content. -[{configure,raster/r.drain/README,scripts/r.drain/README,lib/external/ccmath/C01-matrix}] +# configure is autoconf-generated and uses BEL (\007) as an awk +# field separator, which editorconfig-checker's binary detection flags as +# non-utf-8. +[configure] charset = unset diff --git a/lib/external/ccmath/C01-matrix b/lib/external/ccmath/C01-matrix index 4cc90fa843b..65cd771c205 100644 --- a/lib/external/ccmath/C01-matrix +++ b/lib/external/ccmath/C01-matrix @@ -877,8 +877,8 @@ qrbd1 updated by the computation v = pointer to store of n by n orthogonal matrix V updated by the computation - m = number of rows in the U1 matrix - n = size of the d and e arrays, number of columns in the U1 + m = number of rows in the U1 matrix + n = size of the d and e arrays, number of columns in the U1 matrix, and the number of rows and columns in the V matrix. return value: N = number of QR iterations required diff --git a/raster/r.drain/README b/raster/r.drain/README index f6d18654856..93c72dfc10c 100644 --- a/raster/r.drain/README +++ b/raster/r.drain/README @@ -21,7 +21,7 @@ r.d2 reproduces most of the behavior of r.drain. It does not use the all of the flags defined for r.drain. My first draft of the model didn't correctly handle the ew,ns and diagonal resolutions (as r.fill.dir does not). I believe that I fixed that problem. There are -also some other minor behaviors that differ a little from r.drain. +also some other minor behaviors that differ a little from r.drain. r.d2 runs pretty quickly on a small, clean dem, but it can take quite a while to run on a large cell map - particularly one with very many diff --git a/scripts/r.drain/README b/scripts/r.drain/README index f6d18654856..93c72dfc10c 100644 --- a/scripts/r.drain/README +++ b/scripts/r.drain/README @@ -21,7 +21,7 @@ r.d2 reproduces most of the behavior of r.drain. It does not use the all of the flags defined for r.drain. My first draft of the model didn't correctly handle the ew,ns and diagonal resolutions (as r.fill.dir does not). I believe that I fixed that problem. There are -also some other minor behaviors that differ a little from r.drain. +also some other minor behaviors that differ a little from r.drain. r.d2 runs pretty quickly on a small, clean dem, but it can take quite a while to run on a large cell map - particularly one with very many