Skip to content

Commit

Permalink
Revise Go analysis text and convert to reusable (github#15911)
Browse files Browse the repository at this point in the history
  • Loading branch information
felicitymay authored Oct 9, 2020
1 parent 395882e commit e588ff3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-c

### Configuring {% data variables.product.prodname_code_scanning %} for compiled languages

For the compiled languages C/C++, C#, and Java, {% data variables.product.prodname_codeql %} builds the code before analyzing it. In contrast to the other compiled languages, {% data variables.product.prodname_codeql %} analyzes Go without building the code.
For the compiled languages C/C++, C#, and Java, {% data variables.product.prodname_codeql %} builds the code before analyzing it. {% data reusables.code-scanning.analyze-go %}

For many common build systems, the {% data variables.product.prodname_codeql_runner %} can build the code automatically. To attempt to build the code automatically, run `autobuild` between the `init` and `analyze` steps. Note that if your repository requires a specific version of a build tool, you may need to install the build tool manually first.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ You can quickly analyze small portions of a monorepo when you modify code in spe

### Configuring {% data variables.product.prodname_code_scanning %} for compiled languages

{% data reusables.code-scanning.autobuild-compiled-languages %} In contrast to the other compiled languages, CodeQL can successfully analyze Go without building the code.
{% data reusables.code-scanning.autobuild-compiled-languages %} {% data reusables.code-scanning.analyze-go %}

{% data reusables.code-scanning.autobuild-add-build-steps %} For more information about how to configure {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} for compiled languages, see "[Configuring the {% data variables.product.prodname_codeql %} workflow for compiled languages](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages)."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For general information about configuring {% data variables.product.prodname_cod

### About autobuild for {% data variables.product.prodname_codeql %}

Code scanning works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository. For the compiled languages C/C++, C#, and Java, the process of populating this database involves building the code and extracting data. In contrast to the other compiled languages, CodeQL can generate a database for Go without building the code.
Code scanning works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository. For the compiled languages C/C++, C#, and Java, the process of populating this database involves building the code and extracting data. {% data reusables.code-scanning.analyze-go %}

{% data reusables.code-scanning.autobuild-compiled-languages %}

Expand Down
1 change: 1 addition & 0 deletions data/reusables/code-scanning/analyze-go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% data variables.product.prodname_codeql %} also runs a build for Go projects to set up the project. However, in contrast to the other compiled languages, all Go files in the repository are extracted, not just those that are built. Custom build commands are not supported for Go.

0 comments on commit e588ff3

Please sign in to comment.