Integrating with Bazel

To integrate with Bazel builds, OpenText SAST translates the source files as they are compiled. Therefore, a prerequisite for Bazel builds is that the Bazel build runs successfully. See Build tools for supported Bazel versions.

To integrate with Bazel, navigate to the Bazel workspace directory, and then run sourceanalyzer with the Bazel target you want to build. You can specify other sourceanalyzer options for the translation as follows:

sourceanalyzer -b <build_id> <sca_options> bazel build <target>

Translate a project and exclude a file from the translation:

sourceanalyzer -b MyProjectC -exclude C:\test\MY-JAVA-APP\src\proj\content.py bazel build //projc:my-python-prj