---
schema_version: "1"
id: 9cdcf7bbdb43f0a096f186591c568275b7e482025059e54b107e70b167752fbd
title: Code Analyzer Command Reference (Retired)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/code-analyzer/salesforce-code-analyzer/guides/v3x/command-reference/code-analyzer-command-reference.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/code-analyzer-command-reference.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ba051b8d000869ac62578f4bf6336ea1523651395843b3c03c9fcf9ff5fc415c
products:
  - Salesforce Code Analyzer
---
# Code Analyzer Command Reference (Retired)

This command reference contains information about Salesforce Code Analyzer commands and their flags. 

## Get Started

To scan your code and output any violations found to a results file, run:

- `sf scanner run --target somefile.js --outfile results.html`

### Replace these values:

- `somefile.js`: The source code location.
- `results.html`: The output format.

To scan your code with a specific engine, run

- `sf scanner run --target /some/dir --engine cpd`

### Replace these values:

- `/some/dir`: The source code location.
- `cpd`: The engine or engines to run.

## CI/CD Integration

To continuously improve your code, integrate Code Analyzer results into your CI/CD tool. Your tool can interpret those violations and act on them.

## Graph Engine

To scan your code with Graph Engine data-flow analysis, run:

- `sf scanner run dfa --target ./myproject/main/default/classes/*.cls --projectdir ./myproject/`

### Replace these values:

- `./myproject/main/default/classes/*.cls`: The source code location.
- `./myproject/`: The root project directory.
