@@ -277,7 +277,7 @@ impl<'a> Visitor<'a> {
277
277
fn record_parse_error_for_node (
278
278
& mut self ,
279
279
message : & str ,
280
- args : & [ diagnostics:: Arg ] ,
280
+ args : & [ diagnostics:: MessageArg ] ,
281
281
node : Node ,
282
282
status_page : bool ,
283
283
) {
@@ -307,7 +307,7 @@ impl<'a> Visitor<'a> {
307
307
if node. is_missing ( ) {
308
308
self . record_parse_error_for_node (
309
309
"A parse error occurred (expected {} symbol). Check the syntax of the file. If the file is invalid, correct the error or {} the file from analysis." ,
310
- & [ diagnostics:: Arg :: Code ( node. kind ( ) ) , diagnostics:: Arg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
310
+ & [ diagnostics:: MessageArg :: Code ( node. kind ( ) ) , diagnostics:: MessageArg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
311
311
node,
312
312
true ,
313
313
) ;
@@ -316,7 +316,7 @@ impl<'a> Visitor<'a> {
316
316
if node. is_error ( ) {
317
317
self . record_parse_error_for_node (
318
318
"A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or {} the file from analysis." ,
319
- & [ diagnostics:: Arg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
319
+ & [ diagnostics:: MessageArg :: Link ( "exclude" , "https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning" ) ] ,
320
320
node,
321
321
true ,
322
322
) ;
@@ -409,7 +409,7 @@ impl<'a> Visitor<'a> {
409
409
. location ( self . path , start_line, start_column, end_line, end_column)
410
410
. message (
411
411
"Unknown table type: {}" ,
412
- & [ diagnostics:: Arg :: Code ( node. kind ( ) ) ] ,
412
+ & [ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ] ,
413
413
) ,
414
414
) ;
415
415
@@ -461,10 +461,10 @@ impl<'a> Visitor<'a> {
461
461
self . record_parse_error_for_node (
462
462
"Type mismatch for field {}::{} with type {} != {}" ,
463
463
& [
464
- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
465
- diagnostics:: Arg :: Code ( child_node. field_name . unwrap_or ( "child" ) ) ,
466
- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
467
- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , field. type_info) ) ,
464
+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
465
+ diagnostics:: MessageArg :: Code ( child_node. field_name . unwrap_or ( "child" ) ) ,
466
+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
467
+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , field. type_info) ) ,
468
468
] ,
469
469
* node,
470
470
false ,
@@ -474,9 +474,9 @@ impl<'a> Visitor<'a> {
474
474
self . record_parse_error_for_node (
475
475
"Value for unknown field: {}::{} and type {}" ,
476
476
& [
477
- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
478
- diagnostics:: Arg :: Code ( & child_node. field_name . unwrap_or ( "child" ) ) ,
479
- diagnostics:: Arg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
477
+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
478
+ diagnostics:: MessageArg :: Code ( & child_node. field_name . unwrap_or ( "child" ) ) ,
479
+ diagnostics:: MessageArg :: Code ( & format ! ( "{:?}" , child_node. type_name) ) ,
480
480
] ,
481
481
* node,
482
482
false ,
@@ -516,8 +516,8 @@ impl<'a> Visitor<'a> {
516
516
self . record_parse_error_for_node (
517
517
"Too many values for field: {}::{}" ,
518
518
& [
519
- diagnostics:: Arg :: Code ( node. kind ( ) ) ,
520
- diagnostics:: Arg :: Code ( table_name) ,
519
+ diagnostics:: MessageArg :: Code ( node. kind ( ) ) ,
520
+ diagnostics:: MessageArg :: Code ( table_name) ,
521
521
] ,
522
522
* node,
523
523
false ,
@@ -637,8 +637,8 @@ fn location_for(visitor: &mut Visitor, n: Node) -> (usize, usize, usize, usize)
637
637
. message (
638
638
"Cannot correct end column value: end_byte index {} is not in range [1,{}]." ,
639
639
& [
640
- diagnostics:: Arg :: Code ( & index. to_string ( ) ) ,
641
- diagnostics:: Arg :: Code ( & source. len ( ) . to_string ( ) ) ,
640
+ diagnostics:: MessageArg :: Code ( & index. to_string ( ) ) ,
641
+ diagnostics:: MessageArg :: Code ( & source. len ( ) . to_string ( ) ) ,
642
642
] ,
643
643
)
644
644
. severity ( diagnostics:: Severity :: Error ) ,
0 commit comments