Registered by Marius Kruger

A bazaar plugin to help avoid committing trailing white space and other undesired text to your code base.


* 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> ... ]
    long_line_length=<number of characters>
    long_line_exceptions= <regex>, <regex> ... (ignore long lines that maches
        any of these)
    check_eol_type={crlf|lf} (fails if a line doesn't match)
  for example:
    [name *.py *.java NEWS README]
    long_line_exceptions=".*3$", x
* 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-check-warn-only`` commit option.
  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-check-warn-only``
* 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-trailing-whitespace *.py"``

Planned features, more or less in the order of priority:
* Automatically remove new trailing whitespace when committing. (Will probably
  use the content filters.)

Project information

Part of:
Bazaar VCS and Tools
Marius Kruger
Marius Kruger

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Programming languages:

All bugs Latest bugs reported

Get Involved


Bazaar Text Checker Plugin does not have any download files registered with Launchpad.