Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore(rome_deserialize): use correct category
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Mar 17, 2023
1 parent 6bd0a69 commit aec33ef
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Found errors in the configuration file, Rome will use its defaults for the secti
```

```block
rome.json:6:17 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
rome.json:6:17 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Incorrect type, expected a string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Found errors in the configuration file, Rome will use its defaults for the secti
```

```block
rome.json:6:13 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
rome.json:6:13 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Found an unknown key `foo_rule`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Found errors in the configuration file, Rome will use its defaults for the secti
```

```block
rome.json:3:18 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
rome.json:3:18 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! The line width exceeds the maximum value (320)
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_deserialize/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
/// Diagnostic emitted during the deserialization
#[derive(Debug, Serialize, Clone, Deserialize, Diagnostic)]
#[diagnostic(
category = "configuration",
category = "deserialize",
severity = Error
)]
pub struct DeserializationDiagnostic {
Expand Down
7 changes: 4 additions & 3 deletions crates/rome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ define_categories! {
// General categories
"files/missingHandler",
"format",
"configuration",
"organizeImports",
"deserialize",
"internalError/io",
"internalError/fs",
"internalError/panic",
Expand All @@ -183,7 +186,6 @@ define_categories! {
"lint/security",
"lint/style",
"lint/suspicious",
"lint/configuration",

// Suppression comments
"suppressions/parse",
Expand All @@ -192,8 +194,7 @@ define_categories! {
"suppressions/unused",
"suppressions/deprecatedSyntax",

"configuration",
"organizeImports",


// Used in tests and examples
"args/fileNotFound",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: malformedOptions.js

# Diagnostics
```
malformedOptions.js:2:5 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
malformedOptions.js:2:5 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Found an unknown key `hook`
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_lsp/tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ async fn pull_diagnostics_for_rome_json() -> Result<()> {
},
},
severity: Some(lsp::DiagnosticSeverity::ERROR),
code: Some(lsp::NumberOrString::String(String::from("configuration",))),
code: Some(lsp::NumberOrString::String(String::from("deserialize",))),
code_description: None,
source: Some(String::from("rome")),
message: String::from("Found an unknown value `magic`",),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_extraneous_field.json
---
files_extraneous_field.json:3:3 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_extraneous_field.json:3:3 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown key `foo`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_ignore_incorrect_type.json
---
files_ignore_incorrect_type.json:3:13 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_ignore_incorrect_type.json:3:13 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key ignore is incorrect. Expected array

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_ignore_incorrect_value.json
---
files_ignore_incorrect_value.json:3:25 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_ignore_incorrect_value.json:3:25 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Incorrect type, expected a string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_incorrect_type.json
---
files_incorrect_type.json:2:11 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_incorrect_type.json:2:11 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key files is incorrect. Expected object

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_incorrect_type_for_value.json
---
files_incorrect_type_for_value.json:3:14 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_incorrect_type_for_value.json:3:14 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key maxSize is incorrect. Expected number

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: files_negative_max_size.json
---
files_negative_max_size.json:3:14 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
files_negative_max_size.json:3:14 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× invalid digit found in string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: formatter_extraneous_field.json
---
formatter_extraneous_field.json:3:3 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
formatter_extraneous_field.json:3:3 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown key `foo`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: formatter_format_with_errors_incorrect_type.json
---
formatter_format_with_errors_incorrect_type.json:3:23 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
formatter_format_with_errors_incorrect_type.json:3:23 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key formatWithErrors is incorrect. Expected boolean

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: formatter_incorrect_type.json
---
formatter_incorrect_type.json:2:15 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
formatter_incorrect_type.json:2:15 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key formatter is incorrect. Expected object

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: formatter_line_width_too_high.json
---
formatter_line_width_too_high.json:3:16 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
formatter_line_width_too_high.json:3:16 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× number too large to fit in target type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: formatter_line_width_too_higher_than_allowed.json
---
formatter_line_width_too_higher_than_allowed.json:3:16 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
formatter_line_width_too_higher_than_allowed.json:3:16 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The line width exceeds the maximum value (320)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: javascript_formatter_quote_properties.json
---
javascript_formatter_quote_properties.json:4:23 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
javascript_formatter_quote_properties.json:4:23 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown value `wrong`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: javascript_formatter_quote_style.json
---
javascript_formatter_quote_style.json:4:18 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
javascript_formatter_quote_style.json:4:18 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown value `wrong`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: javascript_formatter_semicolons.json
---
javascript_formatter_semicolons.json:4:18 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
javascript_formatter_semicolons.json:4:18 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown value `lorem`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: javascript_formatter_trailing_comma.json
---
javascript_formatter_trailing_comma.json:4:21 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
javascript_formatter_trailing_comma.json:4:21 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown value `wrong`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: organize_imports.json
---
organize_imports.json:3:14 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
organize_imports.json:3:14 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key enabled is incorrect. Expected boolean

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: recommended_and_all.json
---
recommended_and_all.json:3:12 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
recommended_and_all.json:3:12 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× 'recommended' and 'all' can't be both 'true'. You should choose only one of them.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: recommended_and_all_in_group.json
---
recommended_and_all_in_group.json:4:12 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
recommended_and_all_in_group.json:4:12 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× 'recommended' and 'all' can't be both 'true'. You should choose only one of them.

Expand Down
2 changes: 1 addition & 1 deletion crates/rome_service/tests/invalid/schema.json.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: schema.json
---
schema.json:2:13 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
schema.json:2:13 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× The value of key $schema is incorrect. Expected string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: crates/rome_service/tests/spec_tests.rs
expression: top_level_extraneous_field.json
---
top_level_extraneous_field.json:2:2 configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
top_level_extraneous_field.json:2:2 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Found an unknown key `foo_bar`

Expand Down
6 changes: 3 additions & 3 deletions npm/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aec33ef

Please sign in to comment.