GoLand Code Inspection behaves differently from my colleague
Answered
Me and my colleague are working on the same code. We have the same versions of Goland and Go. However his Goland shows more warnings then my instance. I have everything enabled in Code Inspectior settings. He doesn't have any 3rd party plugins.
E.g: “Comparison with errors using equality operators fails on wrapped errors”, "error strings should not end with punctuation or newlines"
Could you please suggest how to enable these warnings in my instance as well?
Please sign in to leave a comment.
Hi Dmitry!
Most likely, the difference here is due to two inspection settings being off for you and on for your colleague. Please open the Settings screen in GoLand, and select Editor => Inspections. From there, try typing in two key search phrases "Comparison with errors", and "Error strings with punctuation" - those should show you two optional inspection parameters to enable (please see the file attached).
Please also note, that there is another quick way to ensure the inspection settings in both environments are the same - you can export/import those as described here - https://www.jetbrains.com/help/go/customizing-profiles.html.
I hope this helps! Please let me know if there is anything else we can assist you with at the moment and we'll be at your service.
Thank you for your answer!
I have the inspection enabled but still the problems window doesn't show it.
Please see attached screenshot
Hi Dmitry,
Thank you for checking this! In such a case, could you please send me the logs from your and your colleague's IDEs? You can upload those here, after generating the logs via Help | Collect Logs and Diagnostic Data in GoLand.
In addition, please try clearing the cache as described here and let me know if that makes any difference - https://www.jetbrains.com/help/go/invalidate-caches.html.
Finally, could you please share the code where the issue is stably reproducible in your environment? I'd like to run some additional checks on our end to see if we're able to reproduce the same misbehavior you faced on your end as well.
Thank you!
Hi Vadym,
Invalidating cache helped. Thank you so much!
Do you still want the logs?
Dmitry,
Thank you for the update! No, no need to send the logs - if invalidating cache helped, then we can consider the case resolved, but if you notice something unusual once again, or if any questions come up, please let us know and we'll be at your service.