You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/08/11 06:57:33 UTC
[GitHub] [camel-k] squakez opened a new issue, #3536: `golangci-lint` version `1.47.2` reports more errors
squakez opened a new issue, #3536:
URL: https://github.com/apache/camel-k/issues/3536
`golangci-lint` used in github actions is now `1.47.2` version and it is reporting several issues.
```
cmd/util/vfs-gen/multifs/multidir.go:43:10 exhaustruct entries is missing in dirInfo
cmd/util/vfs-gen/multifs/multidir.go:87:45 exhaustruct entries is missing in dirInfo
cmd/util/vfs-gen/multifs/multidir.go:110:11 exhaustruct pos is missing in dir
pkg/controller/integrationplatform/create.go:33:10 exhaustruct baseAction is missing in createAction
pkg/controller/integrationplatform/initialize.go:37:10 exhaustruct baseAction is missing in initializeAction
pkg/controller/integrationplatform/initialize.go:134:10 exhaustruct Status is missing in PersistentVolumeClaim
pkg/controller/integrationplatform/initialize.go:139:15 exhaustruct GenerateName, SelfLink, UID, ResourceVersion, Generation, CreationTimestamp, DeletionTimestamp, DeletionGracePeriodSeconds, Annotations, OwnerReferences, Finalizers, ClusterName, ManagedFields are missing in ObjectMeta
pkg/controller/integrationplatform/initialize.go:146:9 exhaustruct Selector, VolumeName, StorageClassName, VolumeMode, DataSource, DataSourceRef are missing in PersistentVolumeClaimSpec
pkg/controller/integrationplatform/initialize.go:150:15 exhaustruct Limits is missing in ResourceRequirements
pkg/controller/integrationplatform/integrationplatform_controller.go:74:66 exhaustruct MaxConcurrentReconciles, RateLimiter, Log, CacheSyncTimeout, RecoverPanic are missing in Options
pkg/controller/integrationplatform/integrationplatform_controller.go:80:36 exhaustruct TypeMeta, ObjectMeta, Spec, Status are missing in IntegrationPlatform
pkg/controller/integrationplatform/integrationplatform_controller.go:82:3 exhaustruct CreateFunc, GenericFunc are missing in FilteringFuncs
pkg/controller/integrationplatform/integrationplatform_controller.go:111:31 exhaustruct client, reader, scheme, recorder are missing in reconcileIntegrationPlatform
pkg/controller/integrationplatform/integrationplatform_controller.go:138:10 exhaustruct Requeue, RequeueAfter are missing in Result
pkg/controller/integrationplatform/integrationplatform_controller.go:151:11 exhaustruct Requeue, RequeueAfter are missing in Result
pkg/controller/integrationplatform/integrationplatform_controller.go:160:10 exhaustruct Requeue, RequeueAfter are missing in Result
pkg/controller/integrationplatform/integrationplatform_controller.go:222:9 exhaustruct Requeue is missing in Result
pkg/controller/integrationplatform/kaniko_cache.go:49:9 exhaustruct Status is missing in Pod
pkg/controller/integrationplatform/kaniko_cache.go:54:15 exhaustruct GenerateName, SelfLink, UID, ResourceVersion, Generation, CreationTimestamp, DeletionTimestamp, DeletionGracePeriodSeconds, Annotations, OwnerReferences, Finalizers, ClusterName, ManagedFields are missing in ObjectMeta
pkg/controller/integrationplatform/kaniko_cache.go:61:9 exhaustruct EphemeralContainers, TerminationGracePeriodSeconds, ActiveDeadlineSeconds, DNSPolicy, NodeSelector, ServiceAccountName, DeprecatedServiceAccount, AutomountServiceAccountToken, NodeName, HostNetwork, HostPID, HostIPC, ShareProcessNamespace, SecurityContext, ImagePullSecrets, Hostname, Subdomain, Affinity, SchedulerName, Tolerations, HostAliases, PriorityClassName, Priority, DNSConfig, ReadinessGates, RuntimeClassName, EnableServiceLinks, PreemptionPolicy, Overhead, TopologySpreadConstraints, SetHostnameAsFQDN are missing in PodSpec
pkg/controller/integrationplatform/kaniko_cache.go:98:20 exhaustruct HostPath, EmptyDir, GCEPersistentDisk, AWSElasticBlockStore, GitRepo, Secret, NFS, ISCSI, Glusterfs, RBD, FlexVolume, Cinder, CephFS, Flocker, DownwardAPI, FC, AzureFile, ConfigMap, VsphereVolume, Quobyte, AzureDisk, PhotonPersistentDisk, Projected, PortworxVolume, ScaleIO, StorageOS, CSI, Ephemeral are missing in VolumeSource
pkg/controller/integrationplatform/kaniko_cache.go:99:31 exhaustruct ReadOnly is missing in PersistentVolumeClaimVolumeSource
pkg/controller/integrationplatform/monitor.go:30:10 exhaustruct baseAction is missing in monitorAction
pkg/controller/integrationplatform/warm.go:34:10 exhaustruct baseAction is missing in warmAction
pkg/controller/integrationplatform/warm.go:54:9 exhaustruct Spec, Status are missing in Pod
pkg/controller/integrationplatform/warm.go:59:15 exhaustruct GenerateName, SelfLink, UID, ResourceVersion, Generation, CreationTimestamp, DeletionTimestamp, DeletionGracePeriodSeconds, Labels, Annotations, OwnerReferences, Finalizers, ClusterName, ManagedFields are missing in ObjectMeta
pkg/controller/integrationplatform/create_test.go:36:8 exhaustruct TypeMeta, ObjectMeta, Spec, Status are missing in IntegrationPlatform
pkg/controller/integrationplatform/initialize_test.go:37:8 exhaustruct TypeMeta, ObjectMeta, Spec, Status are missing in IntegrationPlatform
pkg/controller/integrationplatform/warm_test.go:42:9 exhaustruct Spec is missing in Pod
pkg/controller/integrationplatform/warm_test.go:47:15 exhaustruct GenerateName, SelfLink, UID, ResourceVersion, Generation, CreationTimestamp, DeletionTimestamp, DeletionGracePeriodSeconds, Labels, Annotations, OwnerReferences, Finalizers, ClusterName, ManagedFields are missing in ObjectMeta
pkg/controller/integrationplatform/warm_test.go:51:11 exhaustruct Conditions, Message, Reason, NominatedNodeName, HostIP, PodIP, PodIPs, StartTime, InitContainerStatuses, ContainerStatuses, QOSClass, EphemeralContainerStatuses are missing in PodStatus
pkg/controller/integrationplatform/warm_test.go:77:9 exhaustruct Spec is missing in Pod
pkg/controller/integrationplatform/warm_test.go:82:15 exhaustruct GenerateName, SelfLink, UID, ResourceVersion, Generation, CreationTimestamp, DeletionTimestamp, DeletionGracePeriodSeconds, Labels, Annotations, OwnerReferences, Finalizers, ClusterName, ManagedFields are missing in ObjectMeta
pkg/controller/integrationplatform/warm_test.go:86:11 exhaustruct Conditions, Message, Reason, NominatedNodeName, HostIP, PodIP, PodIPs, StartTime, InitContainerStatuses, ContainerStatuses, QOSClass, EphemeralContainerStatuses are missing in PodStatus
pkg/controller/integrationplatform/warm_test.go:112:9 exhaustruct Spec is missing in Pod
pkg/controller/integrationplatform/warm_test.go:121:11 exhaustruct Conditions, Message, Reason, NominatedNodeName, HostIP, PodIP, PodIPs, StartTime, InitContainerStatuses, ContainerStatuses, QOSClass, EphemeralContainerStatuses are missing in PodStatus
pkg/controller/integrationplatform/initialize_test.go:36:6 nosnakecase TestTimeouts_Default contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integrationplatform/initialize_test.go:59:6 nosnakecase TestTimeouts_MavenComputedFromBuild contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integrationplatform/initialize_test.go:89:6 nosnakecase TestTimeouts_Truncated contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integrationplatform/warm_test.go:35:6 nosnakecase TestWarm_Succeeded contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integrationplatform/warm_test.go:70:6 nosnakecase TestWarm_Failing contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integrationplatform/warm_test.go:105:6 nosnakecase TestWarm_WarmingUp contains underscore. You should use mixedCap or MixedCap.
pkg/util/util.go:277:39 nosnakecase O_RDWR contains underscore. You should use mixedCap or MixedCap.
pkg/util/util.go:565:27 nosnakecase O_RDWR contains underscore. You should use mixedCap or MixedCap.
pkg/util/camel/camel_dependencies.go:57:98 exhaustruct Classifier, Exclusions are missing in Dependency
pkg/util/camel/camel_dependencies.go:139:58 exhaustruct Name is missing in Repository
pkg/util/camel/camel_dependencies.go:142:17 exhaustruct UpdatePolicy is missing in RepositoryPolicy
pkg/util/camel/camel_dependencies.go:146:18 exhaustruct UpdatePolicy is missing in RepositoryPolicy
pkg/util/camel/camel_dependencies.go:166:12 exhaustruct Dependencies is missing in Plugin
pkg/util/camel/camel_dependencies.go:183:11 exhaustruct Version, Type, Classifier, Scope, Exclusions are missing in Dependency
pkg/util/camel/camel_dependencies.go:209:10 exhaustruct Version, Type, Classifier, Scope, Exclusions are missing in Dependency
pkg/util/camel/camel_runtime_catalog.go:28:13 exhaustruct CamelCatalogSpec, artifactByScheme, artifactByDataFormat, schemesByID, languageDependencies, javaTypeDependencies are missing in RuntimeCatalog
pkg/util/camel/catalog.go:69:33 exhaustruct ApplicationClass, Dependencies, Capabilities are missing in RuntimeSpec
pkg/util/camel/catalog.go:129:13 exhaustruct TypeMeta, ObjectMeta, Status, Spec are missing in CamelCatalog
pkg/util/camel/catalog.go:178:12 exhaustruct Dependencies is missing in Plugin
pkg/util/camel/catalog.go:194:13 exhaustruct Extensions is missing in Build
pkg/util/camel/camel_util_test.go:30:10 exhaustruct Artifacts, Loaders are missing in CamelCatalogSpec
pkg/util/camel/camel_util_test.go:31:10 exhaustruct Artifacts, Loaders are missing in CamelCatalogSpec
pkg/builder/types.go:77:2 containedctx found a struct that contains a context.Context field
cmd/util/doc-gen/generators/traitmetadatagen.go:111:36 nosnakecase O_RDWR contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/local/local_test.go:29:6 nosnakecase TestValidatePropertyFiles_ShouldSucceed contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/local/local_test.go:45:6 nosnakecase TestValidatePropertyFiles_ShouldFailNotAPropertiesFile contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/local/local_test.go:62:6 nosnakecase TestValidatePropertyFiles_ShouldFailNotFound contains underscore. You should use mixedCap or MixedCap.
pkg/trait/trait_types.go:174:2 containedctx found a struct that contains a context.Context field
pkg/trait/jvm.go:82:1 maintidx Function name: Apply, Cyclomatic Complexity: 41, Halstead Volume: 6379.68, Maintainability Index: 18
pkg/trait/route_test.go:197:6 nosnakecase TestRoute_Default contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:219:6 nosnakecase TestRoute_Disabled contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:244:6 nosnakecase TestRoute_Configure_IntegrationKitOnly contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:258:6 nosnakecase TestRoute_Host contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:284:6 nosnakecase TestRoute_TLS_From_Secret_reencrypt contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:319:6 nosnakecase TestRoute_TLS_wrong_secret contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:348:6 nosnakecase TestRoute_TLS_secret_wrong_key contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:376:6 nosnakecase TestRoute_TLS_secret_missing_key contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:404:6 nosnakecase TestRoute_TLS_reencrypt contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:439:6 nosnakecase TestRoute_TLS_edge contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:473:6 nosnakecase TestRoute_TLS_passthrough contains underscore. You should use mixedCap or MixedCap.
pkg/trait/route_test.go:505:6 nosnakecase TestRoute_WithCustomServicePort contains underscore. You should use mixedCap or MixedCap.
pkg/trait/util_test.go:159:6 nosnakecase TestMigrateLegacyConfiguration_invalidConfiguration contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integration/kits_test.go:37:6 nosnakecase TestLookupKitForIntegration_DiscardKitsInError contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integration/kits_test.go:114:6 nosnakecase TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integration/kits_test.go:247:6 nosnakecase TestHasMatchingTraits_KitNoTraitShouldNotBePicked contains underscore. You should use mixedCap or MixedCap.
pkg/controller/integration/kits_test.go:287:6 nosnakecase TestHasMatchingTraits_KitSameTraitShouldBePicked contains underscore. You should use mixedCap or MixedCap.
pkg/util/cancellable/cancellable.go:45:2 containedctx found a struct that contains a context.Context field
pkg/install/cluster.go:43:1 maintidx Function name: SetupClusterWideResourcesOrCollect, Cyclomatic Complexity: 44, Halstead Volume: 4245.09, Maintainability Index: 19
pkg/install/operator.go:76:1 maintidx Function name: OperatorOrCollect, Cyclomatic Complexity: 63, Halstead Volume: 7841.09, Maintainability Index: 12
pkg/install/cluster.go:97:27 nosnakecase Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition contains underscore. You should use mixedCap or MixedCap.
pkg/install/cluster.go:102:31 nosnakecase Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/uninstall.go:130:2 ifshort variable 'uninstallViaOLM' is only used in the if-statement (pkg/cmd/uninstall.go:150:2); consider using short syntax
pkg/cmd/install.go:214:1 maintidx Function name: install, Cyclomatic Complexity: 78, Halstead Volume: 10097.10, Maintainability Index: 6
pkg/cmd/run.go:497:1 maintidx Function name: createOrUpdateIntegration, Cyclomatic Complexity: 48, Halstead Volume: 7726.13, Maintainability Index: 15
pkg/cmd/root.go:47:2 nosnakecase _client contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/root.go:225:13 nosnakecase _client contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/root.go:226:18 nosnakecase _client contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/run_help_test.go:45:6 nosnakecase TestExtractProperties_SingleKeyValue contains underscore. You should use mixedCap or MixedCap.
pkg/cmd/run_help_test.go:56:6 nosnakecase TestExtractProperties_FromFile contains underscore. You should use mixedCap or MixedCap.
pkg/util/registry/registry_test.go:26:6 nosnakecase TestAuth_GenerateDockerConfig contains underscore. You should use mixedCap or MixedCap.
pkg/util/registry/registry_test.go:55:6 nosnakecase TestAuth_Validate contains underscore. You should use mixedCap or MixedCap.
```
_Originally posted by @squakez in https://github.com/apache/camel-k/issues/3533#issuecomment-1211616408_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1221982788
Are you on golang version 1.17 as well? or maybe it's a matter of operating system!?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] tadayosi commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1222045605
Hmm, what's the exact command you've run? Just `make lint`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] tadayosi commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1221965130
Yes I ran it with golangci-lint v1.47.2. Now I upgraded it to v1.47.3 and it still passes fine. The `main` branch also passes fine with v1.47.3 now:
https://github.com/apache/camel-k/actions/runs/2901683821
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez closed issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez closed issue #3536: `golangci-lint` version `1.47.2` reports more errors
URL: https://github.com/apache/camel-k/issues/3536
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1222029666
I'm not on a Mac either :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] tadayosi commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1222002868
Yes, I'm using Go version 1.17.10. I use Linux (Fedora 36) and CI is Ubuntu 20.04 so perhaps it's an issue specific to macOS?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1221951429
I've updated the golangci-lint to version 1.47.2 and that log in the description is the result of `make lint` execution. Can you try running the same command with that version upgraded?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1222123349
Yes, that one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] tadayosi commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1219195767
@squakez Where do you see this? I don't see such errors in the validate CI and also with `make lint` locally.
`exhaustruct` and `nosnakecase` should be explicitly disabled in `.golangci.yml`. Other lints such as `containedctx` and `maintidx` must have been explicitly nolinted per code. I wonder why they don't take effect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3536: `golangci-lint` version `1.47.2` reports more errors
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3536:
URL: https://github.com/apache/camel-k/issues/3536#issuecomment-1237817903
It seems was some kind of flakiness. Now it works correctly :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org