which means that you are removing utest.runner.Framework inserted automatically for you by sbt-doctest and you are inserting your own custom test framework, provided by class test.utest.MyCustomFramework, in this example.

Caveats

There are still dependencies from ScalaTest and/or ScalaCheck when property checks are employed.

The difficulty can be circumvented for the time being by providing all dependencies in build.sbt, like
shown in the example below which uses uTest with property checks, which require ScalaTest and ScalaCheck as well:

Ignoring Some Files

If you don't want to generate doctests for some of your sources, then specify a regex pattern:

doctestIgnoreRegex :=Some(".*SomeClass.scala")

Source files with canonical paths (using UNIX separator - /) matching the regex, will not be used for doctest generation.

Only Code Blocks Mode

If you all you need is to check that code in Scaladoc code blocks (text inside {{{}}}) compiles),
you can enable only code blocks mode by setting doctestOnlyCodeBlocksMode to true:

doctestOnlyCodeBlocksMode :=true

Generated tests won't have any assertions, unless they are present in your Scaladocs.

HTML Entities

Often when documenting libraries that work with HTML you need to encode HTML entities so that they will be displayed in browsers.

However, sbt-doctest ignores these and attempts to compare encoded HTML with unencoded HTML entities. You can fix this by enabling decoding of HTML entities. Just add the following setting to your build.sbt: