command module
Version: v2.1.1+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2016 License: Apache-2.0 Imports: 1 Imported by: 0


Doc-hunt Build Status codecov codebeat badge

Doc-hunt track changes occuring in a source code to help keeping documentation up to date.

How it works ?

Example :

This repository contains a and it rely heavily on features made in cmd module (cmd folder in this repository), so to keep file up to date, we need to track some files incmd folder. You can check this repository to have an example how it works with travis.

Part 1 : Setup

To setup this tracking we do :

doc-hunt add config 'cmd/(config.*|update|version|check)(?<!_test).go'

It creates a file .doc-hunt at the root of this repository and we record it to version control system, this file will track every changes occuring in files recorded in config.

Part 2 : Tracking changes

After few changes in source code, we want to check if we have to update, we run :

doc-hunt check

And we get :



    => cmd/check.go
Part 3 : Update doc-hunt

We check if we made changes in file cmd/check.go that could be documented in When everything looks fine, we update .doc-hunt file doing (we are going to commit .doc-hunt afterwards) :

doc-hunt update


From release page download the binary according to your system architecture


doc-hunt keep a track of version app used to record configuration, it's necessary to use a binary with same major version or configuration needs to be redo to update to a new major version.


Ensure your documentation is up to date

  doc-hunt [command]

Available Commands:
  check       Check if documentation update could be needed
  config      List, add or delete configuration
  update      Update documentation references
  version     App version

  -h, --help   help for doc-hunt

Use "doc-hunt [command] --help" for more information about a command.
config add

A config line is made with a document (a file, a folder in current repository or an external URL) with one or several sources (a pcre regexp matching file sources that need to be tracked).

Example 1

Add a new configuration on all php files in two different folders :

doc-hunt config add folder1/.*.php,folder2/.*.php
Example 2

Add a new configuration on all php files in a folder and exclude test files :

doc-hunt config add 'folder1/.*(?<!_test).php'
-n flag, try config

It's possible to simulate what this command will do adding a -n option like so :

doc-hunt config add -n folder1/.*.php
config list

List all existing configurations :

doc-hunt config list
config del

Remove unwanted configuration (This command will launch a prompt) :

doc-hunt config del

To check all changes occuring in a source code :

doc-hunt check
-e flag, crash when a change occurs

To make doc-hunt crashes when changes are detected (useful in a CI), add a e flag like so :

doc-hunt check -e

To record every changes and make doc-hunt not complaining anymore :

doc-hunt update

New version of .doc-hunt must be committed with all changes added.


The Go Gopher

There is no documentation for this package.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL