about summary refs log tree commit diff
path: root/src/tools/jsondocck
AgeCommit message (Collapse)AuthorLines
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-1/+1
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-07-13Compiletest: Simplify {Html,Json}DocCk directive handlingLeón Orell Valerian Liehr-23/+8
2025-06-05jsondocck: Explain what `KNOWN_DIRECTIVE_NAMES` is doingAlona Enraght-Moony-1/+1
2025-05-29jsondocck: command -> directiveAlona Enraght-Moony-39/+41
2025-05-28jsondoclint: Extract `Command`/`CommandKind` into its own fileAlona Enraght-Moony-222/+233
2025-04-20jsondocck: Require command is at start of lineAlona Enraght-Moony-0/+1
2025-04-15rustdoc: Output target feature informationWill Glynn-1/+1
`#[target_feature]` attributes refer to a target-specific list of features. Enabling certain features can imply enabling other features. Certain features are always enabled on certain targets, since they are required by the target's ABI. Features can also be enabled indirectly based on other compiler flags. Feature information is ultimately known to `rustc`. Rather than force external tools to track it -- which may be wildly impractical due to `-C target-cpu` -- have `rustdoc` output `rustc`'s feature data.
2025-03-21jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`Alona Enraght-Moony-2/+2
2025-03-01jsondocck: catch and error on deprecated syntaxYotam Ofek-0/+18
2025-03-01jsondocck: minor cleanupsYotam Ofek-15/+10
- replace `OnceLock` with `LazyLock` - use `let..else` where applicable
2025-01-10jsondoclint: Support `//@ !has <path> <value>`.Alona Enraght-Moony-4/+23
This was removed for not being used [1], but now we need it. [1]: https://github.com/rust-lang/rust/pull/133478#discussion_r1874358362
2024-12-09jsondocck: Parse, don't validate commands.Alona Enraght-Moony-262/+169
2024-10-29Rename `command-list.rs` to `directive-list.rs`Zalathar-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+9
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-19Update jsondocck directives to follow ui_test-styleLeón Orell Valerian Liehr-38/+29
2024-07-04Rollup merge of #127309 - its-the-shrimp:jsondocck_add_file_var, r=aDotInTheVoidMatthias Krüger-1/+1
jsondocck: add `$FILE` built-in variable This built-in variable will allow accessing the full path to the currently tested file and allow to test things like source code spans generated by rustdoc-json, and that is exactly the reason why I've come up with the idea to add this [futher discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/rustdoc-json.20test.20help/near/449039819)
2024-07-04added built-in var to jsondocckschvv31n-1/+1
2024-07-03jsondocck: Use correct index for error message.Alona Enraght-Moony-1/+3
If you misused a count command like `@count $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` Fixing this typo, we now get. ``` Invalid command: Second argument to @count must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix.
2024-04-28Remove direct dependencies on lazy_static, once_cell and byteorderGeorge Bateman-5/+5
The functionality of all three crates is now available in the standard library.
2023-11-18jsondocck: bump jsonpath to 0.3, dropping few dup dependenciesklensy-1/+1
changes: https://github.com/freestrings/jsonpath/compare/v0.2.6...v0.3.0 self_cell: bump to 0.10.3 due to RUSTSEC-2023-0070 https://rustsec.org/advisories/RUSTSEC-2023-0070.html https://github.com/Voultapher/self_cell/issues/49 bump h2 to 0.3.22, dropping few dup crate versions https://github.com/hyperium/h2/blob/v0.3.22/CHANGELOG.md
2023-07-12Allow to have `-` in the rustdoc-json test file nameGuillaume Gomez-2/+4
2023-04-10Fix remaining typosDaniPopes-1/+1
2022-08-18Remove need to give JSON file pathGuillaume Gomez-107/+53
2022-08-12Jsondocck: New `@ismany` commandNixon Enraght-Moony-0/+42
2022-03-15jsondocck: Better error for invalid @count numberNixon Enraght-Moony-1/+4
2022-03-15jsondocck: better error for when @set matches multiple itemsNixon Enraght-Moony-1/+1
2022-02-09jsondocck: Improved error messages for invalid json value and failed @count ↵Nixon Enraght-Moony-2/+16
check
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-06-01replace lazy_static with once_cell, drop direct dependency on serdeklensy-8/+7
2021-06-01updated shlex for jsondocckklensy-1/+1
2021-03-24Better errors in jsondocckNixon Enraght-Moony-4/+27
2021-03-10Improve some jsondocck errorsNixon Enraght-Moony-2/+22
2021-02-22Simplify Error Handling.Nixon Enraght-Moony-29/+21
2021-02-21Extract string_to_value to its own functionNixon Enraght-Moony-17/+13
2021-02-21Apply suggestions from code reviewNixon Enraght-Moony-3/+3
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-02-20Implement using @set valuesNixon Enraght-Moony-5/+17
2021-02-20Implement @setNixon Enraght-Moony-0/+23
2021-02-20Add @is command to jsondocckNixon Enraght-Moony-1/+17
2021-01-23fmtRune Tynan-4/+6
2021-01-23Make bad shlex parsing a pretty errorRune Tynan-1/+14
2021-01-19Address review v2Rune Tynan-15/+19
2021-01-19Shift another panic into an exitRune Tynan-2/+1
2021-01-19Address review commentsRune Tynan-63/+29
2021-01-19Add jsondocck tool, and use it for rustdoc JSONRune Tynan-0/+413