A bazaar plugin to help avoid committing trailing white space and other undesired text to your code base.
Features:
* Currently we can check for new trailing whitespace, tabs, files not ending
with a newline and long lines. It is also possible to set the long-line
length and to disregard certain lines when doing the long-line check.
* Configuration is done by adding rules to BZR_HOME/rules (where BZR_HOME can
be determined using ``bzr version``, its labeled as "Bazaar configuration").
See also ``bzr help rules`` for more info on bazaar's rule support.
This plugin supports the following rules:
[name <file glob pattern> <file glob pattern> ... ]
trailing_
tabs=
newline_
long_
long_
long_
any of these)
check_
check_
for example:
[name *.py *.java NEWS README]
trailing_
tabs=warn
newline_
long_
long_lines=warn
long_
* The different actions are defined as follows:
ignore --> do nothing
warn --> print a waning message when committing
fail --> prevent the commit from succeeding
* A commit with violating text can be forced using the
``--text-
This is handy when there is a special case and need to commit violating text,
so one does not need to change the configs for accepting a rare violation.
``bzr commit --text-
* The current configuration for a branch can be viewed by using:
``bzr text-check-info [FILE...]``
* Check the current changes without attempting a commit:
``bzr check-text``
* Recursively remove trailing whitespace for files matching a pattern can be
done using: ``remove-
Planned features, more or less in the order of priority:
* Automatically remove new trailing whitespace when committing. (Will probably
use the content filters.)
``text_
Project information
- Licence:
- GNU GPL v2, GNU GPL v3
View full history Series and milestones
trunk series is the current focus of development.