style: Strip stray control characters instead of excluding files - #7891
Merged
Conversation
The editorconfig-checker bump to v3.11.3 (OSGeo#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 OSGeo#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 OSGeo#7888
nilason
approved these changes
Sep 5, 2026
echoix
enabled auto-merge (squash)
September 5, 2026 16:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #7459, resolving the discussion in #7888.
The editorconfig-checker bump to v3.11.3 added a pre-decode binary-detection
check that flags a file as binary, and so fails the utf-8 charset check, if it
contains any C0 control byte. Four files were marked
charset = unsetas amechanical workaround. In #7888, @nilason confirmed the bytes in three of them
carry no meaning and are better removed, including the vendored ccmath file,
which is no longer maintained upstream.
Changes
raster/r.drain/README,scripts/r.drain/README: drop a stray0x18(CAN)in line 24,
that <CAN>differ a little from r.drain.lib/external/ccmath/C01-matrix: lines 880-881 held a0x13/0x16(DC3/SYN) pair acting as a subscript toggle around
U1. The same matrix iswritten plainly as
U1everywhere else in that file, including at lines682-694, 788, 803, 811 and 868, and in the very signature these two lines
document (
u1 = pointer to store of m by n transformation matrix U1), sothe reading is confirmed rather than inferred.
.editorconfig: the exception now covers onlyconfigure, whose BEL byte isa legitimate awk field separator in autoconf-generated code.
No behavioral change; documentation and build-config text only.
Verification
pre-commit run editorconfig-checker --all-filesreports zero charset, utf-8or binary errors across the tree.
lib/external/ccmath/C01-matrixis nowdecoded and charset-checked without complaint rather than skipped, which is
the positive confirmation that the strip worked; the two READMEs no longer
appear at all.
The only errors in that run are line-ending ones, which are a local
core.autocrlf=truecheckout artifact on Windows (git ls-files --eolshowsi/lf w/crlfon untouched files too), not something this PR introduces.Closes #7888
AI (Claude Opus 5) was used to locate the byte sequences, verify the
U1reading against the rest of the file, and check the result with the hook.