[go: up one dir, main page]

Skip to content

chore(no-release): Fix godoc comments; enable godoclint

This MR fixes the godoclint linter issues:

$ golangci-lint run
deployments_merge_requests.go:1:1: package godoc should start with "Package gitlab " (godoclint)
gitlab.go:17:1: package has more than one godoc ("gitlab") (godoclint)
job_token_scope.go:1:1: package godoc should start with "Package gitlab " (godoclint)
job_token_scope_test.go:1:1: package has more than one godoc ("gitlab") (godoclint)
request_options_test.go:1:1: package has more than one godoc ("gitlab") (godoclint)
resource_iteration_events_test.go:1:1: package has more than one godoc ("gitlab") (godoclint)
terraform_states.go:33:1: godoc should start with symbol name ("TerraformState") (godoclint)
terraform_states.go:43:1: godoc should start with symbol name ("TerraformStateVersion") (godoclint)
testing/client.go:1:1: package has more than one godoc ("testing") (godoclint)
9 issues:
* godoclint: 9

Details

GitLab is a library, and its documentation is an important part of it.

There must be an empty line before the copyright header and the package comment.

The -write_package_comment=false flag disables writing // Package testing is a generated GoMock package. in the generated mocks.

Before

Live at https://pkg.go.dev/gitlab.com/gitlab-org/api/client-go@v0.154.0:

image

Live at https://pkg.go.dev/gitlab.com/gitlab-org/api/client-go@v0.154.0/testing:

image

After

Run locally pkgsite . and open http://localhost:8080/gitlab.com/gitlab-org/api/client-go:

image

http://localhost:8080/gitlab.com/gitlab-org/api/client-go/testing:

image

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading