~/bend-docscommunity

bolt/rules/correctness/escape.bend fails

raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/rules/correctness/escape.bend as Escape

rule escape: a string or char literal with \0 then a digit, as in "\033[1m". Bend's escapes are \n \t \r \0 \\ \' \" and \u{..}; it has no octal, so \033 is NUL and then the chars "33" (nohzafk esc_bad: the bytes 00 33 33, not ESC), with no error. Write the code point, \u{1B}. Other unknown escapes (\x1b, \e) the checker rejects on its own.

5 imports
import Base
import ../../src.bend as Src
import ../../finding.bend as F
import ../../../syntax/lex.bend as Lex
import ../../../lazy/lazy.bend as Lazy