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

Duplicate error from SA6003 and S1029 #1589

Open
arp242 opened this issue Aug 14, 2024 · 0 comments
Open

Duplicate error from SA6003 and S1029 #1589

arp242 opened this issue Aug 14, 2024 · 0 comments

Comments

@arp242
Copy link
Contributor

arp242 commented Aug 14, 2024

For the code:

package main

func main() {
	val := []byte("...")
	for _, c := range []rune(string(val[1 : len(val)-1])) {
		_ = c
	}
}

Two identical errors are given:

% staticcheck .
main.go:5:2: should range over string, not []rune(string) (S1029)
main.go:5:2: should range over string, not []rune(string) (SA6003)

Looking at the -explain for S1029 and SA6003, the checks seem very similar, if not outright identical? Either way, I wouldn't expect exactly duplicate errors.

(From commit d00dea3, with Go 1.23.0)

@arp242 arp242 added the needs-triage Newly filed issue that needs triage label Aug 14, 2024
@dominikh dominikh removed the needs-triage Newly filed issue that needs triage label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants