Make sure your source files have the right header
Python
Switch branches/tags
Clone or download
Pull request Compare This branch is 13 commits ahead, 1 commit behind obestwalter:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/python/pybuilder_header_plugin
.committerrc
.gitignore
.travis.yml
LICENSE.txt
README.md
build.py
header.py

README.md

PyBuilder Header Plugin Build Status

Ensures that all your source files contain the same file header.

How to use pybuilder_header_plugin

Add plugin dependency to your build.py

use_plugin('pypi:pybuilder_header_plugin')

Configure the plugin within your init function:

@init
def init(project):
    project.set_property('pybuilder_header_plugin_break_build', True)
    project.set_property('pybuilder_header_plugin_expected_header', "# Copyright\n")
    project.set_property('pybuilder_header_plugin_exclude_patterns', ['src/main/python/thirdparty/', 'src/main/python/another_file.py'])

This will break the build if one of your source files does not start with the comment line # Copyright.

It will also ignore files within the exclusion pattern.

Thanks to Michael Gruber for starting up the project with the initial releases.