HomeDocs
DocsCommunityTestimonialsUsersGitHubTwitterBlogJobsTermsPrivacyCookies
TermsPrivacyCookies
Hey! These docs are for version 2.8, which is no longer officially supported. Click here for the latest version, 2.18!

Configuration for roots of source trees.

Config section: [source]

Basic options

None

Advanced options

root_patterns

--source-root-patterns="[["pattern1", "pattern2", ...], ["pattern1", "pattern2", ...], ...]"
PANTS_SOURCE_ROOT_PATTERNS
default:
[
  "/",
  "src",
  "src/python",
  "src/py"
]

A list of source root suffixes. A directory with this suffix will be considered a potential source root. E.g., src/python will match <buildroot>/src/python, <buildroot>/project1/src/python etc. Prepend a / to anchor the match at the buildroot. E.g., /src/python will match <buildroot>/src/python but not <buildroot>/project1/src/python. A * wildcard will match a single path segment, e.g., src/* will match <buildroot>/src/python and <buildroot>/src/rust. Use / to signify that the buildroot itself is a source root. See Source roots.


marker_filenames

--source-marker-filenames="[filename, filename, ...]"
PANTS_SOURCE_MARKER_FILENAMES
default: []

The presence of a file of this name in a directory indicates that the directory is a source root. The content of the file doesn't matter, and may be empty. Useful when you can't or don't wish to centrally enumerate source roots via root_patterns.


Deprecated options

None