# Go

# Configuration - Analysis

This section covers configuration specific to go analyzer. Please make sure to read the general configuration guide first.

# name

  • Type: String
  • Presence: mandatory
  • Description: Shortcode of the analyzer.
  • Example:
name = "go"

# enabled

  • Type: Boolean
  • Presence: mandatory
  • Description: Toggle whether this analyzer should be run.
  • Example:
enabled = true

# meta

  • Type: Table
  • Presence: mandatory
  • Description: Any supported metadata to pass to the analyzer.
  • Example:
[analyzers.meta]
  import_path = "github.com/coreos/rkt"

# import_path

  • Type: String
  • Presence: mandatory
  • Description: Repository source code will be placed in GOPATH/src/{repo-source}.
  • Available Value: None. Expects the repository import paths.
  • Default Value: None. This is a mandatory field which has to be provided by the user.
  • Example:
import_path = "github.com/kubernetes/kops"

# skip_doc_coverage

  • Type: Array
  • Presence: optional
  • Description: Specify which artifacts to skip when calculating documentation coverage. Available values are file.
  • Available Value: file
    • file - Do not include file docs while calculating documentation coverage.
  • Default Value: None.
  • Example:
skip_doc_coverage = ["file"]

# dependencies_vendored

  • Type: boolean
  • Presence: optional
  • Description: If true, instructs the analyzer not to install dependencies, since they are already available in the vendor/ directory of the repository.
  • Available Values: true, false
  • Default Value: false
  • Example:
[analyzers.meta]
dependencies_vendored = true

# Example

version = 1

test_patterns = [
  "tests/*_test.go",
  "**/*_test.go"
]

[[analyzers]]
name = "go"
enabled = true

  [analyzers.meta]
  import_path = "github.com/rkt/rkt"
  dependencies_vendored = true

# Package managers

We need to install your dependencies in order to get a full picture of your code for in-depth analysis. We detect the package manager from the file used for vendor versioning. We support the following package managers:

Filename Package Manager
go.mod go get
Gopkg.lock dep
GLOCKFILE glock
Godeps/Godeps.json godep
dependencies.tsv godeps
glide.lock glide
vendor.conf trash
vendor.yml trash
vendor/manifest gvt
vendor/vendor.json govendor

If the meta property dependencies_vendored is set to true, package installation is skipped.

Last Updated: 12/5/2019, 4:19:36 PM