daml/compiler/damlc/tests/extract-diagnostics.sed
Martin Huschenbett 5f0acbc21f
Add sed script to help with updating the damlc ITs (#7727)
Updating the expected dignostics for `damlc`'s integration tests can
be quite tedious. This PR adds a `sed` script to simplify it a bit.
See the included readme for details.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-19 14:26:59 +02:00

22 lines
238 B
Sed

/Range:/ {
s/^ *Range: */range=/
s/$/;/
h
}
/Severity:/ {
s/^ *Severity: *Ds//
s/Warning/Warn/
y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
s/^/-- @/
G
h
}
/Message:/ {
n
s/^ *//
H
g
s/\n/ /g
p
}