libexpr: Warn on incorrect string usage
The indentation stripping semantics of strings are fairly bad and have a few gotchas where they behave unintuitively. But the good news is, that these cases are easy to catch and can be avoided. This commit adds a warning in the parser when such strings are detected. Unfortunately Nixpkgs uses this kind of a lot, so we won't be able to actually enable this warning for a while to come. Co-authored-by: Commentator2.0 <lix@crystal-cavern.systems> Change-Id: I3b3b68c2eee4cd70959d3f4ca643cb6caf3a2217
This commit is contained in:
co-authored by
Commentator2.0
parent
4e1c216fd3
commit
f1fbd1d095
@@ -0,0 +1,13 @@
|
||||
[[test]]
|
||||
runner = "eval-okay"
|
||||
matrix = true
|
||||
flags = ["--extra-deprecated-features", "broken-string-indentation"]
|
||||
|
||||
[[test]]
|
||||
name = "depr-warning"
|
||||
runner = "eval-okay"
|
||||
in = "in.nix"
|
||||
|
||||
[[test]]
|
||||
runner = "parse-okay"
|
||||
flags = ["--extra-deprecated-features", "broken-string-indentation"]
|
||||
Reference in New Issue
Block a user