# BR-CFG-08

When a regex detector combines catalogs and inline patterns, then the catalogs merge in order, then the inline patterns.

Defined in [Configure a pipeline by file, catalog and command line](https://docs.piighost.dev/en/domain/operations/configuration-and-catalog/#br-cfg-08).

## Where the rule lives

- [`RegexDetectorConfig.build()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/config/models/detector.py#L102)
- [`CompositeDetectorConfig.build()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/config/models/detector.py#L125)
- [`ExactMatchDetectorConfig.build()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/config/models/detector.py#L137)
- [`ChunkedDetectorConfig.build()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/config/models/detector.py#L163)

## Direct tests

- [`tests/config/test_detectors.py::TestChunkedDetectorConfig::test_wraps_a_detector`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L115)
- [`tests/config/test_detectors.py::TestExactDetectorConfig::test_builds_an_exact_detector`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L97)
- [`tests/config/test_detectors.py::TestExactDetectorConfig::test_exact_detector_detects`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L105)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_a_catalog_is_pulled_at_build`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L69)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_catalogs_merge_in_order_then_inline_patterns`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L78)
- [`tests/config/test_models.py::TestDetectorConfig::test_composite_builds_from_nested_detectors`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_models.py#L49)
- [`tests/config/test_models.py::TestDetectorConfig::test_regex_builds_a_regex_detector`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_models.py#L42)

## Indirect tests

- [`tests/config/test_detectors.py::TestChunkedDetectorConfig::test_rejects_overlap_not_below_size`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L123)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_a_1x_hub_reference_is_still_accepted`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L41)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_a_catalog_reference_is_accepted`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L34)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_a_malformed_reference_is_rejected`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L57)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_a_removed_catalog_name_points_to_its_catalog_group`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L49)
- [`tests/config/test_detectors.py::TestRegexCatalogs::test_neither_patterns_nor_catalogs_is_rejected`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_detectors.py#L63)
- [`tests/config/test_models.py::TestDetectorConfig::test_uncompilable_pattern_is_rejected`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_models.py#L68)
- [`tests/config/test_models.py::TestDetectorConfig::test_unknown_key_is_rejected`](https://github.com/Athroniaeth/piighost/blob/master/tests/config/test_models.py#L58)

## Used by

No caller found.

Read from the code graph graphify builds, at the places the domain documentation gives.
