Hey! These docs are for version 2.0, which is no longer officially supported. Click here for the latest version, 2.7!

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


Did this page help you?