mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:21:05 +01:00
Update basic diagnostic capitalization/punctuation (#4328)
This is a primarily automated change:
- Search & replace for capitalization
-
`(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s")([A-Z])`
- `$1\L$2`
- Search & replace for period
-
`(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s"(?:[^)]|\n)+)\.("[,)])`
- `$1$2`
- Limited search & replace for `ERROR: ` -> `error: ` in streamed things
- Leaving a TODO for command_line because there's more cleanup that can
be done there
- Modify diagnostic_consumer.cpp
- ERROR -> error
- WARNING -> warning
---------
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
7f6d684b29
commit
e7aebbe581
+1
-1
@@ -9,7 +9,7 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/while/fail_missing_cond.carbon
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:9: ERROR: Expected `(` after `while`.
|
||||
// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:9: error: expected `(` after `while`
|
||||
// CHECK:STDERR: while {
|
||||
// CHECK:STDERR: ^
|
||||
while {
|
||||
|
||||
+2
-2
@@ -12,14 +12,14 @@ fn F() {
|
||||
while (a) {
|
||||
if (b) {
|
||||
break
|
||||
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:5: ERROR: `break` statements must end with a `;`.
|
||||
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:5: error: `break` statements must end with a `;`
|
||||
// CHECK:STDERR: }
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
}
|
||||
if (c) {
|
||||
continue
|
||||
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: ERROR: `continue` statements must end with a `;`.
|
||||
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: error: `continue` statements must end with a `;`
|
||||
// CHECK:STDERR: }
|
||||
// CHECK:STDERR: ^
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
fn F() {
|
||||
while (a)
|
||||
// CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block.
|
||||
// CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: error: expected braced code block
|
||||
// CHECK:STDERR: break;
|
||||
// CHECK:STDERR: ^~~~~
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user