Skip to content

Commit 8ddf223

Browse files
committed
ignore a validation
1 parent 6fe5316 commit 8ddf223

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

compiler/plc_diagnostics/src/diagnostics/diagnostics_registry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::diagnostician::DiagnosticAssessor;
77

88
use super::{
99
Diagnostic,
10-
Severity::{self, Error, Info, Warning},
10+
Severity::{self, Error, Ignore, Info, Warning},
1111
};
1212

1313
macro_rules! add_diagnostic {
@@ -129,7 +129,7 @@ lazy_static! {
129129
E025, Error, include_str!("./error_codes/E025.md"), // Missing return type
130130
E026, Error, include_str!("./error_codes/E026.md"),
131131
E027, Error, include_str!("./error_codes/E027.md"),
132-
E028, Info, include_str!("./error_codes/E028.md"),
132+
E028, Ignore, include_str!("./error_codes/E028.md"),
133133
E029, Error, include_str!("./error_codes/E029.md"),
134134
E030, Error, include_str!("./error_codes/E030.md"),
135135
E031, Error, include_str!("./error_codes/E031.md"),

src/validation/snapshots/rusty__validation__variable__variable_validator_tests__validate_empty_enum_declaration.snap

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,3 @@ error[E007]: Unexpected token: expected Literal but found )
1313
1414
6 │ my_enum : ();
1515
│ ^ Unexpected token: expected Literal but found )
16-
17-
error[E028]: Variable block is empty
18-
┌─ <internal>:2:14
19-
20-
2 │ TYPE my_enum : (); END_TYPE
21-
│ ^^^^^^^ Variable block is empty
22-
23-
error[E028]: Variable block is empty
24-
┌─ <internal>:6:27
25-
26-
6 │ my_enum : ();
27-
│ ^^ Variable block is empty
28-
29-

src/validation/variable.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -494,23 +494,6 @@ mod variable_validator_tests {
494494

495495
use crate::test_utils::tests::parse_and_validate_buffered;
496496

497-
#[test]
498-
fn validate_empty_struct_declaration() {
499-
let diagnostics = parse_and_validate_buffered(
500-
"
501-
TYPE the_struct : STRUCT END_STRUCT END_TYPE
502-
503-
PROGRAM prg
504-
VAR
505-
my_struct : STRUCT
506-
END_STRUCT
507-
END_VAR
508-
END_PROGRAM
509-
",
510-
);
511-
assert_snapshot!(diagnostics);
512-
}
513-
514497
#[test]
515498
fn validate_empty_enum_declaration() {
516499
let diagnostics = parse_and_validate_buffered(

0 commit comments

Comments
 (0)