Registered by Marius Kruger

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_whitespace={ignore|warn|fail}
    tabs={ignore|warn|fail}
    newline_at_eof={ignore|warn|fail}
    long_line_length=<number of characters>
    long_lines={ignore|warn|fail}
    long_line_exceptions= <regex>, <regex> ... (ignore long lines that maches
        any of these)
    check_eol={ignore|warn|fail}
    check_eol_type={crlf|lf} (fails if a line doesn't match)
  for example:
    [name *.py *.java NEWS README]
    trailing_whitespace=fail
    tabs=warn
    newline_at_eof=warn
    long_line_length=80
    long_lines=warn
    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.)
  ``text_check_action=auto-fix``

Project information

Part of:
Bazaar VCS and Tools
Maintainer:
Marius Kruger
Driver:
Marius Kruger
Licence:
GNU GPL v2, GNU GPL v3

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Bazaar
Programming languages:
python

All bugs Latest bugs reported

Get Involved

Downloads

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