# `TF013` Scan code for references Declare code sources in the manifest and verify Speky discovers tagged references :::{dropdown} Is a test for :open: :icon: check-circle-fill :color: primary - [`SF015` Code sources in manifest](/requirements/SF015) - [`SF016` Scan code for requirement references](/requirements/SF016) ::: :::{dropdown} Source :icon: file-code :color: info __Source file__: [`specs/tests/functional.yaml`](https://github.com/agagniere/speky/blob/master/specs/tests/functional.yaml) __Loaded from__: [`speky`](https://github.com/agagniere/speky/blob/master/specs/speky.yaml) ::: ## Initial state The expected state is the final state of [`TF012` Use a project manifest](/tests/TF012) ## Procedure ### Step 1 Add `code_sources` to the manifest ```console $ cat speky.yaml ``` ```yaml kind: project name: my-project files: - requirements.yaml - tests.yaml code_sources: - src/ ``` ### Step 2 Create a Python source file with a tagged comment ```console $ cat src/feature.py ``` ```python # speky:my-project#RF01 def feature(): pass ``` ### Step 3 Run speky and verify the reference to RF01 is reported ```console $ speky speky.yaml --check-only Loading speky.yaml Loading requirements.yaml Loading tests.yaml Scanning src/ Found reference to RF01 in src/feature.py:1 (feature) ``` ### Step 4 Verify that a tag with an unknown namespace is silently ignored ```console $ cat src/other.py ``` ```python # speky:other-project#RF01 def unrelated(): pass ``` ### Step 5 Run speky again and verify the foreign tag does not appear in the output ```console $ speky speky.yaml --check-only ```