---
schema_version: "1"
id: 20078d120b3dddd9363454ca03f1750c82c1bc7641ce69289ec245e067284743
title: sf scanner rule list (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/list.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/list.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2b037e93828f714882dc6400a2a5b956e6ddd1ab753b448201bc7ebb4b1edc8f
products:
  - Salesforce Code Analyzer
---
# sf scanner rule list (Retired)

Lists all the catalog rules that are enabled by default, except those from the "pmd-appexchange", "eslint-lwc", and "cpd" engines. You can filter the output to view a different set of rules. To get more information about a specific rule, use the `scanner rule describe` command.


## Examples

Review these examples for some ideas on how to run `scanner rule list`.

### All Rules

Invoking without filter criteria returns all the catalog rules that are enabled by default, except those from the "pmd-appexchange", "eslint-lwc", and "cpd" engines. This example returns a table containing all rules.

```
    $ sf scanner rule list
```

### Logical OR

This example returns all rules for Apex OR JavaScript. The values supplied to a single filter are handled with a logical OR.

```
    $ sf scanner rule list --language apex,javascript
```

#### Replace this value:

- `apex,javascript`: The specified language or languages.

### Logical AND

This example returns all rules that target Apex or Javascript, and are members of the Design or Security categories. Different filters are combined with a logical AND.

```
    $ sf scanner rule list --language apex,javascript --category Design,Security
```

#### Replace these values:

- `apex,javascript`: The specified language or languages.
- `Design,Security`: The category or categories of rules to run.

### Exception

This example returns all rules except those in the Design or Best Practices categories. Exclude categories by specifying the negation operator.

```
    $ sf scanner rule list --category !Design,!Best Practices
```

#### Replace this value:

- `!Design,!Best Practices`: The category or categories of rules to exclude.

## Usage

`sf scanner rule list `

&nbsp;&nbsp; [`-c` CATEGORY_LIST]

&nbsp;&nbsp; [`-e` ENGINE_LIST]

&nbsp;&nbsp; [`-l` LANGUAGE_LIST]

&nbsp;&nbsp; [`--json`]

&nbsp;&nbsp; [`--verbose`]


## Flags

`-c` <b>|</b> `--category` CATEGORY_LIST

> Optional
>
> Selects rules by category. Enter multiple values as a comma-separated list.
>
> Type: option

`-e` <b>|</b> `--engine` ENGINE_LIST

> Optional
>
> Selects rules by engine. Enter multiple engines as a comma-separated list.
>
> Type: option
>
> Possible Values: `eslint` | `eslint-lwc` | `eslint-typescript` | `pmd` | `pmd-appexchange` | `retire-js` | `cpd` | `sfge`

`-l` <b>|</b> `--language` LANGUAGE_LIST

> Optional
>
> Selects rules by language. Enter multiple values as a comma-separated list.
>
> Type: option

`--json`

> Optional
>
> Format output as JSON.
>
> Type: boolean

`--verbose`

> Optional
>
> Emit additional command output to stdout.
>
> Type: boolean

[DEPRECATED] `-r` <b>|</b> `--ruleset` RULESET_LIST

> Optional
>
> Deprecated. Use category instead. Selects rules by ruleset. Enter multiple values as a comma-separated list.
>
> Type: option

