rosdistro_reviewer.element_analyzer package
Submodules
rosdistro_reviewer.element_analyzer.rosdep module
- class rosdistro_reviewer.element_analyzer.rosdep.RosdepAnalyzer
Bases:
ElementAnalyzerExtensionPointElement analyzer for changes to the rosdep database.
- analyze(path: Path, target_ref: str | None = None, head_ref: str | None = None) Tuple[List[Criterion] | None, List[Annotation] | None]
Perform analysis to collect criteria and annotations.
The method is intended to be overridden in a subclass.
- Parameters:
path – Path on disk to the git repository
target_ref – The git ref to base the diff from
head_ref – The git ref where the changes have been made
- Returns:
A tuple with a list of criteria and a list of annotations
rosdistro_reviewer.element_analyzer.yamllint module
- class rosdistro_reviewer.element_analyzer.yamllint.YamllintAnalyzer
Bases:
ElementAnalyzerExtensionPointElement analyzer for linting changes to YAML files.
- analyze(path: Path, target_ref: str | None = None, head_ref: str | None = None) Tuple[List[Criterion] | None, List[Annotation] | None]
Perform analysis to collect criteria and annotations.
The method is intended to be overridden in a subclass.
- Parameters:
path – Path on disk to the git repository
target_ref – The git ref to base the diff from
head_ref – The git ref where the changes have been made
- Returns:
A tuple with a list of criteria and a list of annotations
Module contents
- class rosdistro_reviewer.element_analyzer.ElementAnalyzerExtensionPoint
Bases:
objectThe interface for element analyzers.
An element analyzer extension provides criteria and annotations for composing a rosdistro review.
- EXTENSION_POINT_VERSION = '1.0'
- analyze(path: Path, target_ref: str | None = None, head_ref: str | None = None) Tuple[List[Criterion] | None, List[Annotation] | None]
Perform analysis to collect criteria and annotations.
The method is intended to be overridden in a subclass.
- Parameters:
path – Path on disk to the git repository
target_ref – The git ref to base the diff from
head_ref – The git ref where the changes have been made
- Returns:
A tuple with a list of criteria and a list of annotations
- rosdistro_reviewer.element_analyzer.analyze(path: Path, *, extensions: Dict[str, ElementAnalyzerExtensionPoint] | None = None, target_ref: str | None = None, head_ref: str | None = None) Review | None
Invoke each analyzer and construct a rosdistro review.
- Parameters:
path – Path on disk to the git repository
extensions – The element analyzer extensions to use, if None is passed use the extensions provided by
get_element_analyzer_extensions()target_ref – The git ref to base the diff from
head_ref – The git ref where the changes have been made
- Returns:
A new review instance, or None if no analyzer extensions performed any analysis