Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 just documentation provides errors (Probably a regression) #222

Closed
1 task done
kyu08 opened this issue Sep 10, 2023 · 1 comment · Fixed by #233
Closed
1 task done

🐛 just documentation provides errors (Probably a regression) #222

kyu08 opened this issue Sep 10, 2023 · 1 comment · Fixed by #233
Assignees
Labels
A-Linter Area: linter good first issue Good for newcomers

Comments

@kyu08
Copy link
Contributor

kyu08 commented Sep 10, 2023

Environment information

main branch at 9628f6b3382c1f192d686a899b8c3811c851b894

What happened?

  1. Run just documentation at repository root.
  2. Following errors and messages provided.
All output

cargo lintdoc
Compiling xtask_lintdoc v0.0.0 (/Users/kyu08/code/rust/biome/xtask/lintdoc)
Finished dev [unoptimized + debuginfo] target(s) in 3.35s
Running target/debug/xtask_lintdoc
nursery/noConfusingVoidType.js:1:32 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is not valid as a constituent in a union type

1 │ type PossibleValues = number | void;
│ ^^^^
2 │ type MorePossibleValues = string | ((number & any) | (string | void));
3 │

nursery/noConfusingVoidType.js:2:64 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is not valid as a constituent in a union type

1 │ type PossibleValues = number | void;

2 │ type MorePossibleValues = string | ((number & any) | (string | void));
│ ^^^^
3 │

nursery/noConfusingVoidType.js:1:10 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is only valid as a return type or a type argument in generic type

1 │ let foo: void;
│ ^^^^
2 │ let bar = 1 as unknown as void;
3 │ let baz = 1 as unknown as void | string;

nursery/noConfusingVoidType.js:2:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is only valid as a return type or a type argument in generic type

1 │ let foo: void;

2 │ let bar = 1 as unknown as void;
│ ^^^^
3 │ let baz = 1 as unknown as void | string;
4 │

cargo documentation
Checking rome_json_formatter v0.1.0 (/Users/kyu08/code/rust/biome/crates/rome_json_formatter)
Checking rome_js_formatter v0.1.0 (/Users/kyu08/code/rust/biome/crates/rome_js_formatter)
Documenting rome_json_formatter v0.1.0 (/Users/kyu08/code/rust/biome/crates/rome_json_formatter)
Documenting rome_js_formatter v0.1.0 (/Users/kyu08/code/rust/biome/crates/rome_js_formatter)
warning: unresolved link to SyntaxNode
--> crates/biome_js_semantic/src/events.rs:126:36
|
126 | /// Extracts [SemanticEvent] from [SyntaxNode].
| ^^^^^^^^^^ no item named SyntaxNode in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]
= note: #[warn(rustdoc::broken_intra_doc_links)] on by default

warning: public documentation for SemanticEventExtractor links to private item SemanticEventIterator
--> crates/biome_js_semantic/src/events.rs:134:76
|
134 | /// For a simpler way to extract [SemanticEvent] see [semantic_events] or [SemanticEventIterator].
| ^^^^^^^^^^^^^^^^^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items
= note: #[warn(rustdoc::private_intra_doc_links)] on by default

warning: unresolved link to PreOrder
--> crates/biome_js_semantic/src/events.rs:137:10
|
137 | /// the [PreOrder] of the tree, and must pull events until [Pop] returns [None].
| ^^^^^^^^ no item named PreOrder in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to Pop
--> crates/biome_js_semantic/src/events.rs:137:61
|
137 | /// the [PreOrder] of the tree, and must pull events until [Pop] returns [None].
| ^^^ no item named Pop in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to SyntaxNode
--> crates/biome_js_semantic/src/events.rs:1036:36
|
1036 | /// Extracts [SemanticEvent] from [SyntaxNode].
| ^^^^^^^^^^ no item named SyntaxNode in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to SyntaxNode
--> crates/biome_js_semantic/src/semantic_model/builder.rs:6:63
|
6 | /// Builds the [SemanticModel] consuming [SemanticEvent] and [SyntaxNode].
| ^^^^^^^^^^ no item named SyntaxNode in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to SemanticEvents
--> crates/biome_js_semantic/src/semantic_model/builder.rs:9:46
|
9 | /// [SemanticModelBuilder] consumes all the [SemanticEvents] and build all the
| ^^^^^^^^^^^^^^ no item named SemanticEvents in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: public documentation for SemanticModelBuilder links to private item SemanticModelData
--> crates/biome_js_semantic/src/semantic_model/builder.rs:10:32
|
10 | /// data necessary to build a [SemanticModelData], that is allocated with an [Arc]
| ^^^^^^^^^^^^^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items

warning: unresolved link to Arc
--> crates/biome_js_semantic/src/semantic_model/builder.rs:10:79
|
10 | /// data necessary to build a [SemanticModelData], that is allocated with an [Arc]
| ^^^ no item named Arc in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: public documentation for SemanticModel links to private item scope
--> crates/biome_js_semantic/src/semantic_model/model.rs:105:15
|
105 | /// - Scope: [scope]
| ^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items

warning: unresolved link to declaration
--> crates/biome_js_semantic/src/semantic_model/model.rs:106:22
|
106 | /// - Declarations: [declaration]
| ^^^^^^^^^^^ no item named declaration in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: public documentation for SemanticModel links to private item SemanticModelData
--> crates/biome_js_semantic/src/semantic_model/model.rs:108:10
|
108 | /// See [SemanticModelData] for more information about the internals.
| ^^^^^^^^^^^^^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items

warning: unresolved link to Call
--> crates/biome_js_semantic/src/semantic_model/model.rs:341:22
|
341 | /// Returns all [Call] of a [AnyJsFunction].
| ^^^^ no item named Call in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to Call
--> crates/biome_js_semantic/src/semantic_model/reference.rs:105:38
|
105 | /// Returns this reference as a [Call] if possible
| ^^^^ no item named Call in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to ancestors
--> crates/biome_js_semantic/src/semantic_model/scope.rs:100:15
|
100 | /// that [ancestors] return "self" as the first scope,
| ^^^^^^^^^ no item named ancestors in scope
|
= help: to escape [ and ] characters, add '' before them like \[ or \]

warning: unresolved link to semantic_model::SemanticModel::scope
--> crates/biome_js_semantic/src/semantic_model/scope.rs:208:21
|
208 | /// See scope
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic_model is a function, not a module or type, and cannot have associated items

warning: unresolved link to semantic_model::SemanticModel::scope_hoisted_to
--> crates/biome_js_semantic/src/semantic_model/scope.rs:212:21
|
212 | /// See scope
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic_model is a function, not a module or type, and cannot have associated items

warning: biome_js_semantic (lib doc) generated 17 warnings
Checking rome_service v0.0.0 (/Users/kyu08/code/rust/biome/crates/rome_service)
Documenting rome_service v0.0.0 (/Users/kyu08/code/rust/biome/crates/rome_service)
Checking biome_lsp v0.0.0 (/Users/kyu08/code/rust/biome/crates/biome_lsp)
warning: unclosed HTML tag th
--> crates/rome_service/src/configuration/linter/rules.rs:377:5
|
377 | #[doc = "The scope prop should be used only on elements."]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(rustdoc::invalid_html_tags)] on by default

warning: unclosed HTML tag T
--> crates/rome_service/src/configuration/linter/rules.rs:3002:5
|
3002 | #[doc = "When expressing array types, this rule promotes the usage of T[] shorthand instead of Array."]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: try marking as source code
|
3002 | #[doc = "When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>."]
| + +

warning: rome_service (lib doc) generated 2 warnings
Checking biome_cli v0.0.0 (/Users/kyu08/code/rust/biome/crates/biome_cli)
Documenting biome_cli v0.0.0 (/Users/kyu08/code/rust/biome/crates/biome_cli)
Finished dev [unoptimized + debuginfo] target(s) in 19.50s

Especially this part is not provided a few days ago. It is possible regression due to recent changes.

The part of them

 Running `target/debug/xtask_lintdoc`

nursery/noConfusingVoidType.js:1:32 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is not valid as a constituent in a union type

1 │ type PossibleValues = number | void;
│ ^^^^
2 │ type MorePossibleValues = string | ((number & any) | (string | void));
3 │

nursery/noConfusingVoidType.js:2:64 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is not valid as a constituent in a union type

1 │ type PossibleValues = number | void;

2 │ type MorePossibleValues = string | ((number & any) | (string | void));
│ ^^^^
3 │

nursery/noConfusingVoidType.js:1:10 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is only valid as a return type or a type argument in generic type

1 │ let foo: void;
│ ^^^^
2 │ let bar = 1 as unknown as void;
3 │ let baz = 1 as unknown as void | string;

nursery/noConfusingVoidType.js:2:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ void is only valid as a return type or a type argument in generic type

1 │ let foo: void;

2 │ let bar = 1 as unknown as void;
│ ^^^^
3 │ let baz = 1 as unknown as void | string;
4 │

Expected result

No errors provided.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@kyu08
Copy link
Contributor Author

kyu08 commented Sep 10, 2023

As a result of investigation, it was found that the errors have been provided after this commit (92be3f8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants