-
Notifications
You must be signed in to change notification settings - Fork 753
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
fix various linting issues #1048
Open
thaJeztah
wants to merge
15
commits into
vishvananda:main
Choose a base branch
from
thaJeztah:fix_linting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open
link_linux.go:2913:6: func `addBondSlaveAttrs` is unused (unused) func addBondSlaveAttrs(bondSlave *BondSlave, linkInfo *nl.RtAttr) { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
neigh_linux.go:125:6: func `neighAdd` is unused (unused) func neighAdd(neigh *Neigh, mode int) error { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
qdisc_linux.go:770:6: func `time2Ktime` is unused (unused) func time2Ktime(time uint32) uint32 { ^ qdisc_linux.go:774:6: func `ktime2Time` is unused (unused) func ktime2Time(ktime uint32) uint32 { ^ qdisc_linux.go:778:6: func `burst` is unused (unused) func burst(rate uint64, buffer uint32) uint32 { ^ qdisc_linux.go:782:6: func `latency` is unused (unused) func latency(rate uint64, limit, buffer uint32) float64 { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
…govet) conntrack_linux.go:186:30: printf: non-constant format string in call to fmt.Errorf (govet) return matched, fmt.Errorf(strings.Join(errMsgs, "; ")) ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
devlink_linux.go:327:7: S1009: should omit nil check; len() for []byte is defined as zero (gosimple) if rawData != nil && len(rawData) == 1 { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
addr_linux.go:159:16: composites: github.com/vishvananda/netlink/nl.IfaCacheInfo struct literal uses unkeyed fields (govet) cachedata := nl.IfaCacheInfo{unix.IfaCacheinfo{ ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
conntrack_linux.go:501:6: func `parseRaw32` is unused (unused) func parseRaw32(r *bytes.Reader, v *uint32) { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
netlink_test.go:57:6: S1005: unnecessary assignment to the blank identifier (gosimple) if found, _ := foundRequiredMods[name]; !found { ^ netlink_test.go:221:6: S1005: unnecessary assignment to the blank identifier (gosimple) if found, _ := foundRequiredMods[name]; !found { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
conntrack_linux.go:639:19: ineffectual assignment to l (ineffassign) if nested, t, l = parseNfAttrTL(reader); nested && t == nl.CTA_TUPLE_IP { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
devlink_linux.go:262:2: field `rawData` is unused (unused) rawData []byte ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
…error route_test.go:1023:8: ineffectual assignment to err (ineffassign) link, err := setUpRoutesBench(b) ^ route_test.go:1046:8: ineffectual assignment to err (ineffassign) link, err := setUpRoutesBench(b) ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
force-pushed
the
fix_linting
branch
2 times, most recently
from
January 21, 2025 09:11
7e059ff
to
f309a37
Compare
nl/tc_linux.go:1079:2: const `__TCA_FLOWER_MAX` is unused (unused) __TCA_FLOWER_MAX ^ ioctl_linux.go:31:2: const `_ETH_SS_NTUPLE_FILTERS` is unused (unused) _ETH_SS_NTUPLE_FILTERS ^ Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
force-pushed
the
fix_linting
branch
from
January 21, 2025 10:12
f309a37
to
6b4ed95
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
More to come, but these were fairly trivial fixes.