Skip to content

Commit 59518d1

Browse files
authored
Fix various diagnostics typos in settings.mdx and diagnostics.mdx (#115)
* Add missing 'conventions' group to diagnostics group defaults The conventions group was missing from the default values listed for diagnostics.groupFileStatus and diagnostics.groupSeverity settings. * Fix 'global-element' typo in diagnostics defaults Renamed global-elements to global-element in the default values listed for diagnostics.neededFileStatus and diagnostics.severity settings. * Remove 'cast-type-mismatch' duplicate diagnostic entry A duplicate cast-type-mismatch diagnostic entry was incorrectly listed in the luadoc group, in addition to the type-check group.
1 parent 329c9ea commit 59518d1

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

src/content/wiki/diagnostics.mdx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,22 +261,6 @@ Triggered when referencing an undefined global (assumed to be global). The typic
261261

262262
The luadoc group contains diagnostics for the [annotations](/wiki/annotations) used to document your code.
263263

264-
<Diagnostic level="Warning">
265-
<Fragment slot="name">
266-
### cast-type-mismatch
267-
</Fragment>
268-
269-
Triggered when casting a variable to a type that does not match its initial type.
270-
271-
```Lua
272-
---@type boolean
273-
local e = nil
274-
275-
---@cast e integer
276-
```
277-
278-
</Diagnostic>
279-
280264
<Diagnostic level="Warning">
281265
<Fragment slot="name">
282266
### circle-doc-class

src/content/wiki/settings.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ Find defined global variables using regex.
266266
* spell-check
267267
*/
268268
"codestyle": "Fallback",
269+
/*
270+
* global-element
271+
*/
272+
"conventions": "Fallback",
269273
/*
270274
* duplicate-index
271275
* duplicate-set-field
@@ -388,6 +392,10 @@ Set the file status required for each diagnostic group. This setting is an `Obje
388392
* spell-check
389393
*/
390394
"codestyle": "Fallback",
395+
/*
396+
* global-element
397+
*/
398+
"conventions": "Fallback",
391399
/*
392400
* duplicate-index
393401
* duplicate-set-field
@@ -534,7 +542,7 @@ Set how files loaded with [`workspace.library`](#workspacelibrary) are diagnosed
534542
"duplicate-index": "Any",
535543
"duplicate-set-field": "Opened",
536544
"empty-block": "Opened",
537-
"global-elements": "None",
545+
"global-element": "None",
538546
"global-in-nil-env": "Any",
539547
"incomplete-signature-doc": "None",
540548
"inject-field": "Opened",
@@ -622,7 +630,7 @@ Set how files loaded with [`workspace.library`](#workspacelibrary) are diagnosed
622630
"duplicate-index": "Warning",
623631
"duplicate-set-field": "Warning",
624632
"empty-block": "Hint",
625-
"global-elements": "Warning",
633+
"global-element": "Warning",
626634
"global-in-nil-env": "Warning",
627635
"incomplete-signature-doc": "Warning",
628636
"inject-field": "Warning",

0 commit comments

Comments
 (0)