Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 5 commits into from
May 5, 2025
Merged

chore: golangci-lint linting fixes #107

merged 5 commits into from
May 5, 2025

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 5, 2025

No description provided.

@Emyrk Emyrk changed the title Stevenmasley/lint chore: golangci-lint linting fixes May 5, 2025
@Emyrk Emyrk requested a review from aslilac May 5, 2025 21:47
Comment on lines +23 to +35
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")
}
Copy link
Member Author

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

Copy link
Member

@aslilac aslilac left a 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)
Copy link
Member

Choose a reason for hiding this comment

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

same here

@Emyrk
Copy link
Member Author

Emyrk commented May 5, 2025

@aslilac I need to do a longer look for this dead code. I just missed the ones you commented on 👍

@Emyrk Emyrk merged commit bfd58e2 into main May 5, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants