{"schemaVersion":"2.0.0","locale":"en","title":"Advisory CI","description":"Keep the pre-prod analyzer advisory. Preserve reports and exit codes for review; do not treat this documentation as a default blocking policy.","htmlUrl":"https://docs.swift-analyzer.com/guides/ci/","markdownUrl":"https://docs.swift-analyzer.com/guides/ci/index.md","productRevision":"524fa07e0ae4153c84ac12ae9eb6559df89ec2be","catalogRevision":"4558458d","docsRevision":"1f17ba58ab08627e0de898f1442067b09e960b48cd5605d6529e9275f8930d68","channel":"pre-prod","maturity":"experimental","access":"owner-provided-checkout","markdown":"# Advisory CI\n\nKeep the pre-prod analyzer advisory. Preserve reports and exit codes for review; do not treat this documentation as a default blocking policy.\n\n## Pin the environment and inputs\n\nUse the same owner-provided product revision and compatible macOS toolchain as the documentation. Review build authorization for the package and locked dependencies. Run the small tutorial first; arbitrary hosted runners or Linux environments are not qualified by the macOS source-scan example.\n\n## Preserve the report and the process result\n\nA shell step can record the result without replacing an incomplete analysis with a clean status:\n\n```sh\nif \"$ANALYZER\" source-scan \\\n  --package-path \"$PACKAGE_PATH\" --product \"$PRODUCT_NAME\" \\\n  --allow-build --format json > analysis.json 2> analysis.stderr\nthen\n  analyzer_exit=0\nelse\n  analyzer_exit=$?\nfi\nprintf '%s\\n' \"$analyzer_exit\" > analysis.exit\n```\n\nSet `PACKAGE_PATH` and `PRODUCT_NAME` to reviewed inputs in your CI configuration. Store all three files as job artifacts. Read the exit file before consuming JSON; a failed acquisition or invalid request may not produce the document you expected. Report degraded and unavailable states explicitly to reviewers.\n\n## Avoid an accidental gate\n\nThe manifest `scan` command exposes an explicit `--gate` option and workflow inputs. Their existence does not authorize blocking adoption or define a baseline for your project. Decide an application-specific policy only after qualifying the selected snapshot and rules. Source-scan has no `--gate` flag in this revision.\n\n[JSON and exit codes](https://docs.swift-analyzer.com/reference/output/) distinguishes incomplete capability, invalid input, toolchain failure and a configured findings gate failure.\n","anchors":["advisory-ci","pin-the-environment-and-inputs","preserve-the-report-and-the-process-result","avoid-an-accidental-gate"]}
