Repository navigation
[Linting Rule] Non Ascii Code
Generated from 'wiki-linter.ts' on 2026-10-25, 09:29:25 UTC (v2.16.6), do not edit directly.
Non-ASCII Code [overview]
This rule ports the following steps of R CMD check (see the conformance table for the legend):
| # | Step | Coverage | Note |
|---|---|---|---|
| 36 | code files for non-ASCII characters (book) | 🟩⭐ | ⭐ also reports each token instead of each file, escapes strings as a quick fix |
| 44 | package namespace information (book) | 🔶 |
This rule is a best-effort rule.
Finds non-ASCII characters in R code and the NAMESPACE outside of comments. Offers \u escapes for strings as a quick fix.
This linting rule is implemented in src/linter/rules/cmd-check/non-ascii-code.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The non-ascii-code rule accepts the following configuration options:
-
checkStrings
report string literals holding non-ASCII characters (defaulttrue, asR CMD checkdoes)
R CMD check #36 -
checkSymbols
report symbols holding non-ASCII characters (defaulttrue, asR CMD checkdoes)
R CMD check #36
escaped <- function() message("Gr\u00fc\u00dfe")
literal <- function() message("Grüße")The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "non-ascii-code", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (2 ms)
╰ Non-ASCII Code (non-ascii-code):
╰ certain:
╰ non-ASCII string ["ü","ß"] at 2.31-37 (1 quick fix(es) available)
More examples are the test cases in test/functionality/linter/cmd-check/lint-non-ascii-code.test.ts.
Currently maintained by Florian Sihler and Oliver Gerstl at Ulm University
Email | GitHub | Penguins | Portfolio
- 🧑💻 Developer Onboarding
- 💻 Setup
- 👓 Overview
- 🪟 Interfacing with flowR
- 🌋 Core
- 🧹 Testing & Linting (Benchmark Page)
⁉️ FAQ- ℹ️ Extra Information