[ann] bzr-whitespace plugin
Marius Kruger
amanic at gmail.com
Mon Jan 12 09:08:17 GMT 2009
2009/1/12 Martin Pool <mbp at sourcefrog.net>
> That sounds pretty handy. Can you make a small Launchpad project for
> it rather than keeping it in +junk, and then it can come up in the
> list at http://launchpad.net/bazaar/
>
> cool, I'll do that when I know what to call it.
What do people think about `bzr-text-checker` ?
Here is the current documentation so people can give feedback without
downloading it:
"""
Plugin to avoid adding trailing white space and other undesired text.
Features:
* Currently we check for new trailing whitespace, leading tabs or files
not ending with a newline.
* You can specify which files to check by adding a config item eg.:
``text_check_file_filters=*.py, NEWS``
* Configurations may appear in the bazaar.conf, locations.conf or
branch.conf.
* By default it would just print out warnings when you commit violating
text,
but it can be explicitly configured:
``text_check_action=warn``
* If you would like this plugin to prevent you from committing violating
text,
you can do this by adding the following to your configuration:
``text_check_action=fail``
Planned features, more or less in the order of priority:
* Be able to force a commit with violating text using a commit option.
When this plugin is configured to 'fail', this option would temporarily
override the action with 'warn'.
This is handy if you have a special case and need to commit violating
text,
but don't want to go and change the configs for accepting a rare
violation.
``bzr commit --text-check-warn-only``
* Add a command to print out config
bzr text-check-info
* Also check for long lines. Default to 80, but be able to set it eg:
text_checks_max_line_length=79
* Be able to to configure which checks to perform:
text_checks=trailing-whitespace, leading-tabs, newline-at-eof, long-lines
* Add a command to remove all trailing white space
bzr remove-trailing-whitespace "*.py"
bzr rtws "*.py"
* Automatically remove new trailing whitespace when committing. Will
probably
use the new content filters of Ian Clatworthy when that lands in bazaar.
``text_check_action=auto-fix``
"""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090112/a87fa08a/attachment-0001.htm
More information about the bazaar
mailing list