Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add '-set_exit_status=1' to golint command #240

Closed
jpkrohling opened this issue Feb 28, 2019 · 3 comments
Closed

Add '-set_exit_status=1' to golint command #240

jpkrohling opened this issue Feb 28, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@jpkrohling
Copy link
Contributor

jpkrohling commented Feb 28, 2019

golint requires the option -set_exit_status=1 to be set in order to fail the command. Without it, we ended up merging PRs that are not passing the linting checks:

/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/account/main.go:48:1: exported function JaegerServiceAccountFor should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/apis/io/v1alpha1/jaeger_types.go:157:6: exported type ElasticsearchSpec should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:15:2: exported const ServiceAccountName should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:69:6: exported type ElasticsearchStorageSpec should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:85:6: exported type ElasticsearchNodeUpgradeStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:90:6: exported type ElasticsearchUpgradePhase should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:93:2: exported const NodeRestarting should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:104:6: exported type UpgradeStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:107:2: exported const UnderUpgradeTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:111:6: exported type ElasticsearchRequiredAction should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:114:2: exported const ElasticsearchActionRollingRestartNeeded should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:122:6: exported type ElasticsearchNodeRole should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:125:2: exported const ElasticsearchRoleClient should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:130:6: exported type ShardAllocationState should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:133:2: exported const ShardAllocationTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:146:6: exported type PodStateMap should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:148:6: exported type PodStateType should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:151:2: exported const PodStateTypeReady should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:156:6: exported type ManagementState should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:159:2: comment on exported const ManagementStateManaged should be of the form "ManagementStateManaged ..."
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:162:2: comment on exported const ManagementStateUnmanaged should be of the form "ManagementStateUnmanaged ..."
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:191:6: exported type ConditionStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:194:2: exported const ConditionTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:199:6: exported type ClusterEvent should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:202:2: exported const ScaledDown should have comment (or a comment on this block) or be unexported
@jpkrohling jpkrohling changed the title Add '-set_exit_status=1`' Add '-set_exit_status=1' to golint command Feb 28, 2019
@jpkrohling
Copy link
Contributor Author

For this to work, the following needs to be fixed. @pavolloffay, most of those are related to ES, would you please document them?

/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/account/main.go:48:1: exported function JaegerServiceAccountFor should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch_secrets.go:91:1: comment on exported function CreateESCerts should be of the form "CreateESCerts ..."
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:15:2: exported const ServiceAccountName should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:69:6: exported type ElasticsearchStorageSpec should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:85:6: exported type ElasticsearchNodeUpgradeStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:90:6: exported type ElasticsearchUpgradePhase should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:93:2: exported const NodeRestarting should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:104:6: exported type UpgradeStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:107:2: exported const UnderUpgradeTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:111:6: exported type ElasticsearchRequiredAction should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:114:2: exported const ElasticsearchActionRollingRestartNeeded should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:122:6: exported type ElasticsearchNodeRole should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:125:2: exported const ElasticsearchRoleClient should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:130:6: exported type ShardAllocationState should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:133:2: exported const ShardAllocationTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:146:6: exported type PodStateMap should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:148:6: exported type PodStateType should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:151:2: exported const PodStateTypeReady should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:156:6: exported type ManagementState should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:159:2: comment on exported const ManagementStateManaged should be of the form "ManagementStateManaged ..."
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:162:2: comment on exported const ManagementStateUnmanaged should be of the form "ManagementStateUnmanaged ..."
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:191:6: exported type ConditionStatus should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:194:2: exported const ConditionTrue should have comment (or a comment on this block) or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:199:6: exported type ClusterEvent should have comment or be unexported
/mnt/storage/jpkroehling/Projects/src/github.com/jaegertracing/jaeger-operator/pkg/storage/elasticsearch/v1alpha1/types.go:202:2: exported const ScaledDown should have comment (or a comment on this block) or be unexported

@jpkrohling jpkrohling added the bug Something isn't working label Apr 2, 2019
@jpkrohling
Copy link
Contributor Author

Marking as a bug, as our usage of golint isn't doing what it should do (prevent lint failures from getting merged).

@pavolloffay
Copy link
Member

I would prefer not changing that file (it is copied from other repo) and rather exclude it from lint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants