Registered by Stian Selnes

Plugin for Bazaar which goal is to check if the committed code conforms to a specific code style. An external code style program are used for the style checking, such as "GNU Indent" or "Unqrustify". It can also correct the files that does not conform to the given style.


  - Check if changed files violates a defined coding style.
  - Uses an external program to check code style, such as GNU Indent, Uncrustify or similar.
  - Fail the commit or print a warning when a violation is detected.
  - Fix code style for one file, only modified or all all files using the "bzr style-check" command.


  The plugin is configured through the .conf-files bazaar.conf, locations.conf or branch.conf. Three options are available:

  - style_checker_command: The command to run in order to generate a file with correct code style. This option is
    defined as a template, e.g.

        uncrustify -q -c $ROOT/codestyle.cfg -f $IN -o $OUT

    where IN and OUT are mandatory and specifies the input and output files of the command. ROOT is optional and is root
    directory of the working tree.

  - style_checker_file_filters: A pattern that specifies which files to check.

  - style_checker_action: The action to take when a code style violation is detected. Two possible values: "fail" or "warn".
    "fail" makes a commit fail if a violation is detected, while "warn" only prints a warning.

  A complete configuration may look like this:

      style_checker_command = uncrustify -q -c $ROOT/codestyle.cfg -f $IN -o $OUT
      style_checker_file_filters = *.c, *.h
      style_checker_action = fail

Project information

Part of:
Bazaar VCS and Tools
Stian Selnes
Stian Selnes

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

  • Report a bug
  • warning
    Ask a question
  • warning
    Help translate


Latest version is 0.1.1

All downloads