Getting started with Checks Code Compliance

Code Compliance is used through the Checks CLI and results are uploaded to the Checks Console.

Install Code Compliance

To get started, follow the installation instructions for the Checks CLI.

Once installed, you'll be able to run Code Compliance commands:

checks code <command>

Scan your project

After installing Checks Code Compliance, you can scan your codebase to understand how sensitive data is collected, shared, or processed.

To scan your repository code using the Code Compliance CLI, use the checks code scan command.

For example, to test the my-swift-app repository that's in the folder repositories/personal:

checks code scan repositories/personal/my-swift-app

By default, Code Compliance will output results to a text format in the terminal.

Output test results in JSON format

To export the results to a JSON format in the terminal:

checks code scan PATH --format=json > ./checks-code-results

To export the results to a JSON format and save to a local file:

checks code scan PATH --format=json > ./checks-code-results.json

Output test results in HTML format

To export the results to a HTML format in the terminal:

checks code scan PATH --format=html > ./checks-code-results

To export the results to a HTML format and save to a local file:

checks code scan PATH --format=html > ./checks-code-results.html

Additional help

Run checks code scan --help.

Set up automated scans

See our CI/CD Overview documentation for setting up automated Code Compliance scans.

Getting support

Send an email to checks-support@google.com whenever you need help with Checks Code Compliance, or Checks in general.