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:
Jon Ross-Perkins
2024-09-19 21:32:53 +00:00
committed by GitHub
co-authored by Richard Smith
parent 7f6d684b29
commit e7aebbe581
578 changed files with 2166 additions and 2173 deletions
@@ -13,52 +13,52 @@ fn Run1(a: i32) {}
fn Run2(a: i32, b: i32) {}
fn Main() {
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 1 argument(s) passed to function expecting 0 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 1 argument(s) passed to function expecting 0 argument(s).
// CHECK:STDERR: Run0(1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: calling function declared here
// CHECK:STDERR: fn Run0() {}
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR:
Run0(1);
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 2 argument(s) passed to function expecting 0 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 argument(s) passed to function expecting 0 argument(s).
// CHECK:STDERR: Run0(0, 1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: calling function declared here
// CHECK:STDERR: fn Run0() {}
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR:
Run0(0, 1);
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 0 argument(s) passed to function expecting 1 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 argument(s) passed to function expecting 1 argument(s).
// CHECK:STDERR: Run1();
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: calling function declared here
// CHECK:STDERR: fn Run1(a: i32) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
Run1();
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 2 argument(s) passed to function expecting 1 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 argument(s) passed to function expecting 1 argument(s).
// CHECK:STDERR: Run1(0, 1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: calling function declared here
// CHECK:STDERR: fn Run1(a: i32) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
Run1(0, 1);
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 0 argument(s) passed to function expecting 2 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 argument(s) passed to function expecting 2 argument(s).
// CHECK:STDERR: Run2();
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: calling function declared here
// CHECK:STDERR: fn Run2(a: i32, b: i32) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
Run2();
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: ERROR: 1 argument(s) passed to function expecting 2 argument(s).
// CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: error: 1 argument(s) passed to function expecting 2 argument(s).
// CHECK:STDERR: Run2(0);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: Calling function declared here.
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: calling function declared here
// CHECK:STDERR: fn Run2(a: i32, b: i32) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
Run2(0);