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

golangci enable additional linters (prealloc predeclared whitespace tagalign) and fix issues #27959

Merged
merged 8 commits into from
Nov 11, 2024

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Nov 9, 2024

enabled linters prealloc predeclared whitespace tagalign
white space linter does not seem to have the same impact anymore (6m vs 5m)

updated golangci.yml to 1.22

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #0000

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@katbyte katbyte changed the title golangci enable prealloc and predeclared linters and update config to go 1.22 golangci enable addtional linters Nov 9, 2024
@katbyte katbyte changed the title golangci enable addtional linters golangci enable additional linters (prealloc predeclared) and fix issues Nov 9, 2024
@katbyte katbyte changed the title golangci enable additional linters (prealloc predeclared) and fix issues golangci enable additional linters (prealloc predeclared whitespace) and fix issues Nov 9, 2024
@katbyte katbyte changed the title golangci enable additional linters (prealloc predeclared whitespace) and fix issues golangci enable additional linters (prealloc predeclared whitespace tagalign) and fix issues Nov 9, 2024
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except one of the changes might be adding a potential crash back into the provider

var output []ClusterSettingModel
if input == nil || len(*input) == 0 {
return output
if len(*input) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still want to check if input is nil before casing to it

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@katbyte katbyte merged commit 4bba591 into main Nov 11, 2024
29 of 30 checks passed
@katbyte katbyte deleted the kt/golang-ci-more-linting branch November 11, 2024 17:56
@github-actions github-actions bot added this to the v4.10.0 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement service/aadb2c service/advisor service/api-management service/app-configuration service/app-service service/application-insights service/attestation service/authorization service/automanage service/automation service/azure-stack-hci service/batch service/blueprints service/bots service/cdn service/cognitive-services service/communication service/container-apps service/cosmosdb service/cost-management service/dashboard service/data-factory service/data-share service/databox-edge service/databricks service/dev-center service/devtestlabs service/dynatrace service/elasticsan service/event-hubs EventHubs service/firewall service/fluid-relay service/frontdoor service/graph service/hdinsight service/healthcare service/hybrid-compute service/iot-central service/kusto service/lighthouse service/load-balancers service/load-test service/log-analytics service/logic service/maintenance service/managed-apps service/managed-hsm service/management-groups service/mobile-network service/mongo-cluster service/monitor service/mssql Microsoft SQL Server service/mssqlmanagedinstance service/netapp service/network service/network-function service/nginx service/orbital service/paloalto service/policy service/postgresql service/private-dns-resolver service/recovery-services service/redis service/search service/security-center service/sentinel service/service-bus service/signalr service/spring service/storage service/storagemover service/subscription service/synapse service/systemcentervirtualmachinemanager service/traffic-manager service/workloads size/XL state-migration tooling waiting-response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants