Pants v2: Fast, consistent builds for Python and more

Welcome to the Pants v2 documentation hub!

Pants v2 is a fast, scalable build system for growing codebases. It's currently focused on Python, with support for other languages coming soon.

Here you'll find guides to help you get started with Pants v2, comprehensive documentation on how to configure, run and customize Pants v2, and information on how to get help from the Pants community.

Get Started

sourcefile-validation

Configuration for source file validation.

Config section: [sourcefile-validation]

Basic options

--sourcefile-validation-config="{'key1': val1, 'key2': val2, ...}"
PANTS_SOURCEFILE_VALIDATION_CONFIG
config
default: {}
Config schema is as follows:

{
'path_patterns': [
{
'name': path_pattern1',
'pattern': <path regex pattern>,
'inverted': True|False (defaults to False),
'content_encoding': <encoding> (defaults to utf8)
},
...
],
'content_patterns': [
{
'name': 'content_pattern1',
'pattern': <content regex pattern>,
'inverted': True|False (defaults to False)
}
...
],
'required_matches': {
'path_pattern1': [content_pattern1, content_pattern2],
'path_pattern2': [content_pattern1, content_pattern3],
...
}
}

Meaning: if a file matches some path pattern, its content must match all
the corresponding content patterns.


Advanced options

None

Deprecated options

None

Updated about a month ago


sourcefile-validation


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.