-
Notifications
You must be signed in to change notification settings - Fork 0
chore: golangci-lint linting fixes #107
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
Conversation
func asStringsIsDangerous(m dsl.Matcher) { | ||
m.Import("github.com/zclconf/go-cty/cty") | ||
|
||
m.Match( | ||
`$v.AsString()`, | ||
). | ||
Where( | ||
m["v"].Type.Is("cty.Value") && | ||
// Ignore unit tests | ||
!m.File().Name.Matches(`_test\.go$`), | ||
). | ||
Report("'AsStrings()' can result in a panic if the type is not known. Ignore this linter with caution") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding this. If misused it is an easy panic. I might continue to add these kinds of "be careful" cty stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather remove a bunch of this commented out code than leave it, but I'll defer to you on if you wanna take the opportunity now or not
log.go
Outdated
@@ -11,5 +11,5 @@ func init() { | |||
Level: tlog.LevelDebug, | |||
})) | |||
var _ = ll | |||
//tlog.SetDefault(ll) | |||
// tlog.SetDefault(ll) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@aslilac I need to do a longer look for this dead code. I just missed the ones you commented on 👍 |
No description provided.