.deepsource.toml
configuration specific to the go
analyzer. Please make sure to read the general configuration guide first.
name
enabled
meta
import_paths
import_root
skip_doc_coverage
file
file
- Do not include file docs while calculating documentation coverage.dependencies_vendored
true
, false
false
build_tags
cgo_enabled
import_path
import_path
is now deprecated. It will still be used if the import_paths
array is empty, for backward compatibility. It is recommended to configure import_root
and let the analyzer automatically figure out the import_paths
instead of using this field.cyclomatic_complexity_threshold
low
will flag all functions that have a cyclomatic complexity of more than 5
, while setting the threshold to critical
will not flag any function.low
, medium
, high
, very-high
and critical
Risk category | Cyclomatic complexity range | Recommended action |
---|---|---|
low | 1-5 | No action is needed. |
medium | 6-15 | Review and monitor. |
high | 16-25 | Review and refactor. Recommended to add detailed comments if the function absolutely needs to be kept as it is. |
very-high | 26-50 | Refactor to reduce the complexity. |
critical | >50 | Must refactor this. This can make the code untestable and very difficult to understand. |
medium
File name | Package Manager |
---|---|
go.mod | go modules |
Gopkg.lock | dep |
GLOCKFILE | glock |
Godeps/Godeps.json | godep |
dependencies.tsv | godeps |
glide.lock | glide |
vendor.conf | trash |
trash.yaml | trash |
vendor/manifest | gvt |
vendor/vendor.json | govendor |
No dependency file | No deps installed |
dependencies_vendored
is set to true
, dependency installation is skipped.
set
, atomic
, and count
generated by the go test
.
This is how you can generate a coverage profile and report it to the analyzer:
test-coverage
analyzer.
This is how you can combine the coverage artifacts before reporting them:
gofmt
.deepsource.toml
configuration specific to the gofmt
transformer. Please make sure to read the general configuration guide first.
gofumpt
.deepsource.toml
configuration specific to the gofumpt
transformer. Please make sure to read the general configuration guide first.
go.mod
go.sum