Files
lix/tests/functional2/lang/string-indented/depr-warning-escapes.err.exp
T
piegamesandCommentator2.0 56dee9186f libexpr: Warn on incorrect string escapes
In Nixpkgs, there are several strings like "\d\.\d" which attempt to be
a regex but are just literally "d.d". The escaping rules are silly and
we should warn our users about that.

Co-authored-by: Commentator2.0 <lix@crystal-cavern.systems>
Change-Id: I779b0757358fc9adc34dc140e1670b83abc93b67
2026-01-31 15:32:27 +01:00

43 lines
2.3 KiB
Plaintext

warning: ''\a is an ill-defined escape. You can drop the ''\ and simply write a instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:2:4:
1| ''
2| ''\a''\n
| ^
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
warning: ''\f is an ill-defined escape. You can drop the ''\ and simply write f instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:4:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}
warning: ''\{ is an ill-defined escape. You can drop the ''\ and simply write { instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:8:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}
warning: ''\$ is an ill-defined escape. You can drop the ''\ and simply write $ instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:12:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}
warning: ''\" is an ill-defined escape. You can drop the ''\ and simply write " instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:16:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}
warning: ''\v is an ill-defined escape. You can drop the ''\ and simply write v instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:28:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}
warning: ''\\ is an ill-defined escape. You can drop the ''\ and simply write \ instead. Use --extra-deprecated-features broken-string-escape to silence this warning.
at /pwd/in.nix:3:32:
2| ''\a''\n
3| ''\f''\{''\$''\"''\'''\r''\v''\\''\t
| ^
4| ''\'''${"x"}