Closed jordan2175 closed 2 years ago
I am unable to reproduce this. Can you double check the source of your error and share the exact code that produces it as well as the exact error text?
You can see the report on the Go Scorecard here: https://goreportcard.com/report/github.com/openplaybooks/libcacao
Nearly all of these errors are wrong. But if you look at the second entry libcacao/objects/workflow/ifcondition/ifcondition.go
line 49 you can see this exact problem.
It also says that some of the imports are ineffective, but they are part of importing properties into types. So without that import statements, it does not work nor does it compile.
I downloaded your project and ran ineffassign against several of the files and I did not get any errors or warnings reported. The problem seems to be with how goreportcard.com is using this tool. I see there is an open issue there; maybe if you add your voice to it, it will get fixed sooner.
As a side note, I see that your project does not have a go.mod file. This may be problematic, as GOPATH mode is deprecated in favor of modules. This may be the reason for the import
errors you see.
To be clear, none of the errors/warnings you see are ineffectual assignments (or they would say ineffectual assignment
); they are problems loading the code (I'm not sure whether because goreportcard.com is using an old version of ineffassign, or what).
Thanks! Sorry to bother you. I just have not yet added the mod file. I will do that.
If you have:
And then you have:
And then in package kitchen you try to do something like:
This tool will give an error saying that RoomType is not a valid assignment.