# `SF017` Source links in manifest {bdg-ref-primary}`input ` {bdg-ref-primary}`tooling ` The user shall be able to declare a `source_links` section in the project manifest to enable clickable links from code references to the corresponding lines in the hosted repository (GitHub, GitLab, Codeberg, or any compatible platform). The `source_links` section shall accept: - `url`: the base URL of the repository (e.g. `https://github.com/owner/repo`). The special value `auto` instructs Speky to detect it by running `git remote get-url origin` and normalizing the result to an HTTPS URL. - `branch`: the branch or ref used to build links (e.g. `main`). The special value `auto` instructs Speky to detect the current branch by running `git rev-parse --abbrev-ref HEAD`. Defaults to `auto` when omitted. Generated links shall have the form: `{url}/blob/{branch}/{path_from_git_root}#L{line}` Example: ```yaml source_links: url: https://github.com/owner/repo branch: main ``` With auto-detection: ```yaml source_links: url: auto ``` :::{dropdown} References :icon: link :color: secondary __Relates to:__ - [`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/functional.yaml`](https://github.com/agagniere/speky/blob/master/specs/functional.yaml) __Loaded from__: [`speky`](https://github.com/agagniere/speky/blob/master/specs/speky.yaml) __Implemented in:__ {fab}`python` [`SourceLinkConfig`](https://github.com/agagniere/speky/blob/master/python/speky/models.py#L188) :::