The Doc Detective VSCode Extension integrates the Doc Detective documentation testing framework directly into your Visual Studio Code environment. This extension helps you detect, view, and manage documentation tests embedded in your content files, making it easier to keep your documentation accurate and up-to-date.
- Real-time Test Detection: Automatically detects Doc Detective tests in your open files
- Sidebar Integration: View detected tests in a dedicated Doc Detective panel in the activity bar
- Interactive Test Explorer: Navigate through detected tests with collapsible sections for easy viewing
- Syntax Highlighting: Tests are displayed with proper syntax highlighting for improved readability
Doc Detective is a documentation testing framework that helps validate documentation against real product behavior. This extension uses doc-detective-resolver to scan your documentation files for embedded tests and displays them in the sidebar panel.
- Visual Studio Code v1.100.0 or higher
- Open VS Code
- Go to the Extensions view (Ctrl+Shift+X)
- Search for "Doc Detective"
- Click Install
If you prefer to install the extension manually:
- Download the VSIX file from the latest release
- In VS Code, go to the Extensions view (Ctrl+Shift+X)
- Click the "..." menu in the top right of the Extensions view
- Select "Install from VSIX..." and choose the downloaded file
- Open a file that contains Doc Detective tests or inline test steps
- Click the Doc Detective icon in the activity bar
- Review the detected tests in your document
The extension will automatically scan open files for:
- Inline tests using HTML comments or markdown comment syntax
- Test specifications in YAML or JSON format
- Documentation with embedded test steps
You can specify a custom path to your Doc Detective configuration file using the docDetective.configPath setting:
- Open VS Code Settings (File > Preferences > Settings)
- Search for "Doc Detective"
- Set the "Config Path" field to your configuration file path
The path can be:
- Absolute path: Full path to your config file (e.g.,
/home/user/my-project/.doc-detective.json) - Relative path: Path relative to your workspace root (e.g.,
config/.doc-detective.yaml)
If no custom path is specified, the extension automatically searches for these files in your workspace root:
.doc-detective.json.doc-detective.yaml.doc-detective.yml
The configuration file can be in JSON or YAML format and follows the Doc Detective configuration schema.
Doc Detective has multiple components that work together:
- Doc Detective: The main CLI tool for running documentation tests
- Doc Detective Resolver: Library for detecting tests in documentation files
- Doc Detective Core: Core testing functionality
- Doc Detective Common: Shared utilities and components
Interested in contributing to this extension? Check out the Doc Detective GitHub organization to learn more about the project and how to get involved.
Made with ❤️ by the Doc Detective team