Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

ci: enable staticcheck linter #3191

Merged
merged 5 commits into from May 6, 2020
Merged

Conversation

mboersma
Copy link
Member

@mboersma mboersma commented May 4, 2020

Reason for Change:
The staticcheck linter is enabled by default in golangci-lint, although AKS Engine has had it disabled. It points out where errors are being assigned but not actually checked, and some other simplifications.

Issue Fixed:
Refs #1032

Requirements:

Notes:

@codecov
Copy link

codecov bot commented May 4, 2020

Codecov Report

Merging #3191 into master will increase coverage by 0.06%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3191      +/-   ##
==========================================
+ Coverage   71.16%   71.22%   +0.06%     
==========================================
  Files         147      147              
  Lines       25771    25738      -33     
==========================================
- Hits        18339    18332       -7     
+ Misses       6286     6261      -25     
+ Partials     1146     1145       -1     
Impacted Files Coverage Δ
pkg/operations/kubernetesupgrade/upgradecluster.go 80.16% <0.00%> (-1.01%) ⬇️
pkg/api/defaults.go 92.58% <100.00%> (ø)
pkg/api/vlabs/validate.go 80.19% <100.00%> (ø)
pkg/armhelpers/azurestack/compute.go 36.03% <100.00%> (ø)
pkg/armhelpers/compute.go 32.91% <100.00%> (ø)
pkg/api/types.go 94.35% <0.00%> (-0.02%) ⬇️
pkg/api/addons.go 97.87% <0.00%> (-0.01%) ⬇️
pkg/api/components.go 96.95% <0.00%> (+0.06%) ⬆️
pkg/engine/templates_generated.go 38.67% <0.00%> (+0.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fce2924...a1feba4. Read the comment docs.

// Assume that all VMASes in the cluster share a value for platformFaultDomainCount
count = int(*vmas.AvailabilitySetProperties.PlatformFaultDomainCount)
break
id := vmasIDs[0]
Copy link
Member

Choose a reason for hiding this comment

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

should we check for len(vmasIDs) > 0 before doing this?

@mboersma mboersma added this to In progress in backlog via automation May 5, 2020
Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

backlog automation moved this from In progress to Review in progress May 6, 2020
@acs-bot acs-bot added the lgtm label May 6, 2020
@jackfrancis jackfrancis merged commit 1211479 into Azure:master May 6, 2020
backlog automation moved this from Review in progress to Done May 6, 2020
@acs-bot
Copy link

acs-bot commented May 6, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jackfrancis,mboersma]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mboersma mboersma deleted the staticcheck branch May 11, 2020 19:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants