redgate/code-analysis-for-oracle

Verified Publisher

By Redgate

Updated about 5 years ago

Redgate Code Analysis for Oracle

Image
0

929

redgate/code-analysis-for-oracle repository overview

What is Code Analysis for Oracle?

Code Analysis for Oracle checks PL/SQL code for “smells”, suggests best practices, identifies deprecated syntax, and can be used to enforce naming conventions.

What is this image?

This image contains the Code Analysis for Oracle command line interface and all the requisite dependencies.

How to use this image

The Code Analysis for Oracle command line

Customisation
  • Each rule can be classified with one of the following severities: Ignore, Warning and Error. The default for all rules is Error.
  • Specify a subset of rules to run (by default all rules are run). A sample config file can be found here.
  • Use regex to define allowable object naming conventions.
Examples
  • Targeting a folder of scripts with default rules, generating an html report:

docker run --rm -v "path/to/scripts:/app/source" -v "path/to/output:/app/output" redgate/code-analysis-for-oracle /source:/app/source /outfile:/app/output/CodeAnalysisResults.html /IAgreeToTheEula

  • Targeting a single script with default rules, generating a json report:

docker run --rm -v "path/to/script/directory:/app/source" -v "path/to/output:/app/output" redgate/code-analysis-for-oracle /source:/app/source/script.sql /outfile:/app/output/CodeAnalysisResults.json /IAgreeToTheEula

  • Targeting a folder of scripts with custom rules, generating an xml report:

docker run --rm -v "path/to/scripts:/app/source" -v "path/to/output:/app/output" redgate/code-analysis-for-oracle /config:myRules.cao.settings.xml /source:/app/source /outfile:/app/output/CodeAnalysisResults.xml /IAgreeToTheEula

Exit Codes
  • 0 - Code Analysis for Oracle successfully completed its analysis and reported no issues in the analysed SQL files.
  • 1 - Code Analysis for Oracle failed to complete its analysis due to a fatal error.
  • 2 - Code Analysis for Oracle managed to finish but only partially completed its analysis - often this is because one or more SQL files could not be parsed (such files are currently excluded from the generated reports)
  • 3 - Code Analysis for Oracle ran successfully but reported one or more errors in the analysed SQL files
  • 4 - Code Analysis for Oracle ran successfully but reported one or more warnings in the analysed SQL files

Licensing

You will need to the /IAgreeToTheEULA switch. By using this option you consent to the Redgate EULA found at https://www.red-gate.com/eula

You need a Deployment Suite for Oracle license to use this command line on either your local machine or a build server. If you don't have a license, you can use the command line on a trial license for 14 days.

Tag summary

Content type

Image

Digest

Size

136.1 MB

Last updated

about 5 years ago

docker pull redgate/code-analysis-for-oracle