Skip to content

Commit

Permalink
chore(rust): enable doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Feb 23, 2025
1 parent 9e2edf5 commit 9aa2ae8
Show file tree
Hide file tree
Showing 42 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions apps/oxlint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[[bin]]
name = "oxlint"
path = "src/main.rs"
test = false
doctest = false


[target.'cfg(all(not(target_env = "msvc"), not(target_os = "windows")))'.dependencies]
jemallocator = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = false
doctest = false


[[example]]
name = "compiler"
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_allocator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_estree = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
proc-macro = true
doctest = false


[dependencies]
proc-macro2 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_cfg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = false
doctest = false


[dependencies]
oxc_index = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = true
doctest = false


[dependencies]
assert-unchecked = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_diagnostics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
cow-utils = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ecmascript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = true
doctest = false


[dependencies]
oxc_ast = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_estree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
itoa = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_isolated_declarations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false

test = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_language_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
[[bin]]
name = "oxc_language_server"
test = true
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
[lib]
proc-macro = true
test = false
doctest = false


[dependencies]
convert_case = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_mangler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_minifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = true
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false

crate-type = ["lib", "cdylib"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_prettier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_regular_expression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_semantic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_span/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_transformer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true

[lib]
test = true
doctest = false


[dependencies]
oxc-browserslist = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true
[lib]
crate-type = ["cdylib", "rlib"]
test = false
doctest = false


[dependencies]
oxc = { workspace = true, features = ["codegen", "minifier", "semantic", "serialize", "transformer", "isolated_declarations", "wasm"] }
Expand Down
2 changes: 1 addition & 1 deletion napi/minify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
[lib]
crate-type = ["cdylib", "lib"]
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion napi/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
[lib]
crate-type = ["cdylib", "lib"]
test = false
doctest = false


[dependencies]
oxc = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion napi/transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
[lib]
crate-type = ["cdylib", "lib"]
test = false
doctest = false


[dependencies]
oxc = { workspace = true, features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion tasks/ast_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true
[[bin]]
name = "oxc_ast_tools"
test = true
doctest = false


[dependencies]
bitflags = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion tasks/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true
[lib]
test = false
bench = false
doctest = false


[[bench]]
name = "lexer"
Expand Down
2 changes: 1 addition & 1 deletion tasks/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace = true

[lib]
test = false
doctest = false


[dependencies]
console = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion tasks/compat_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace = true

[lib]
test = false
doctest = false


[dependencies]
oxc_tasks_common = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions tasks/coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[[bin]]
name = "oxc_coverage"
test = false
doctest = false


[dependencies]
oxc = { workspace = true, features = ["full", "isolated_declarations", "serialize"] }
Expand Down
2 changes: 1 addition & 1 deletion tasks/javascript_globals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true
[[bin]]
name = "javascript_globals"
test = false
doctest = false


[dependencies]
handlebars = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions tasks/minsize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ workspace = true

[lib]
test = false
doctest = false


[[bin]]
name = "oxc_minsize"
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions tasks/prettier_conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[[bin]]
name = "oxc_prettier_conformance"
path = "src/main.rs"
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion tasks/rulegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true
[[bin]]
name = "rulegen"
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion tasks/transform_checker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace = true

[lib]
test = false
doctest = false


[dependencies]
oxc_allocator = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions tasks/transform_conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ description.workspace = true
workspace = true

[lib]
doctest = false


[[bin]]
name = "oxc_transform_conformance"
test = false
doctest = false


[dependencies]
oxc = { workspace = true, features = ["full"] }
Expand Down
Loading

0 comments on commit 9aa2ae8

Please sign in to comment.