#rustdoc #doc #strip #tool

bin+lib rustdoc-stripper

A tool to manipulate rustdoc comments

13 releases

0.1.13 Jul 2, 2020
0.1.12 May 1, 2020
0.1.9 Jun 24, 2019
0.1.5 Sep 14, 2017
0.1.1 Mar 31, 2016

#646 in Command line utilities

Download history 70/week @ 2020-03-24 233/week @ 2020-03-31 510/week @ 2020-04-07 322/week @ 2020-04-14 296/week @ 2020-04-21 658/week @ 2020-04-28 204/week @ 2020-05-05 379/week @ 2020-05-12 199/week @ 2020-05-19 263/week @ 2020-05-26 653/week @ 2020-06-02 277/week @ 2020-06-09 559/week @ 2020-06-16 163/week @ 2020-06-23 618/week @ 2020-06-30 217/week @ 2020-07-07

1,574 downloads per month
Used in 3 crates

Apache-2.0

70KB
2K SLoC

rustdoc-stripper Build Status

rustdoc-stripper is a tool used to remove rustdoc comments from your code and save them in a comments.cmts file if you want to regenerate them.

Options

Available options for rustdoc-stripper are:

  • -h | --help : Displays this help
  • -s | --strip : Strips the current folder files and create a file with rustdoc information (comments.cmts by default)
  • -g | --regenerate : Recreate files with rustdoc comments from reading rustdoc information file (comments.cmts by default)
  • -n | --no-file-output : Display rustdoc information directly on stdout
  • -i | --ignore [filename]: Ignore the specified file, can be repeated as much as needed, only used when stripping files, ignored otherwise
  • -d | --dir [directory] : Specify a directory path to work on, optional
  • -v | --verbose : Activate verbose mode
  • -f | --force : Remove confirmation demands
  • -m | --ignore-macros : macros in hierarchy will be ignored (so only macros with doc comments will appear in the comments file)
  • -o | --comment-file : specify the file within you want to save rustdoc information

By default, rustdoc is run with -s option:

./rustdoc-stripper -s

IMPORTANT: Only files ending with '.rs' will be stripped/regenerated.

Ignore doc-comment

You can prevent a doc comment to be stripped by prepending it by // rustdoc-stripper-ignore-next.

Example:

// rustdoc-stripper-ignore-next
/// existing comment
pub unsafe fn new() -> Foo {}

No runtime deps