Skip to content

Commit

Permalink
ci(golangcilint): fix deprecated configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ko committed Dec 23, 2024
1 parent 90fc192 commit 4c53a07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ linters-settings:
misspell:
locale: US
errcheck:
ignore: github.com/bl4ko/netbox-ssot/internal/logger:.*
exclude-functions:
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Debug
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Debugf
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Info
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Infof
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Warning
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Warningf
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Error
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Errorf
- (*github.com/bl4ko/netbox-ssot/internal/logger.Logger).Output

issues:
max-issues-per-linter: 50
Expand Down
6 changes: 3 additions & 3 deletions internal/source/vmware/vmware_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ func (vc *VmwareSource) syncHosts(nbi *inventory.NetboxInventory) error {
infoType := info.IdentifierType.GetElementDescription().Key
infoValue := strings.Trim(info.IdentifierValue, " ") // remove blank spaces from value
if infoType == "AssetTag" {
if infoValue == "No Asset Tag" {
infoValue = ""
}
if infoValue == "No Asset Tag" {
infoValue = ""
}

Check warning on line 219 in internal/source/vmware/vmware_sync.go

View check run for this annotation

Codecov / codecov/patch

internal/source/vmware/vmware_sync.go#L217-L219

Added lines #L217 - L219 were not covered by tests
assetTag = infoValue
} else if serialInfoTypes[infoType] {
if info.IdentifierValue != "" {
Expand Down

0 comments on commit 4c53a07

Please sign in to comment.