I asked copilot if there is already such an issue and he said that there is not.
There was an instance where Copilot (Sonnet) provided two different suggestions for modifying the same piece of code in a single response. Both suggestions were implemented immediately, which is not feasible because they represent different modifications of the same original code. As a result, only the last edit remained in effect, overwriting the first suggestion.
Copilot Chat Extension Version: v0.23.2024102903
VS Code Version: 1.95.3
OS Version: Windows 10 Pro - 22H2 - 19045.5131
Steps to Reproduce:
me:
func decodeMsgpack is unused (U1000)go-staticcheck func decodeMsgpack(data []byte) string
Github Copilot:
This function was defined but never used in the code. Here are two possible solutions:
Solution 1 - Remove the unused function:
main.go
Solution 2 - Use the function to improve logging:
main.go
I recommend Solution 2 as it will improve the readability of your debug logs by showing decoded msgpack values instead of hex dumps. However, if you want to keep the logs in their current format, go with Solution 1 and simply remove the unused function.
I asked copilot if there is already such an issue and he said that there is not.
There was an instance where Copilot (Sonnet) provided two different suggestions for modifying the same piece of code in a single response. Both suggestions were implemented immediately, which is not feasible because they represent different modifications of the same original code. As a result, only the last edit remained in effect, overwriting the first suggestion.
Steps to Reproduce:
me: func decodeMsgpack is unused (U1000)go-staticcheck func decodeMsgpack(data []byte) string
Github Copilot: This function was defined but never used in the code. Here are two possible solutions:
Solution 1 - Remove the unused function: main.go Solution 2 - Use the function to improve logging: main.go I recommend Solution 2 as it will improve the readability of your debug logs by showing decoded msgpack values instead of hex dumps. However, if you want to keep the logs in their current format, go with Solution 1 and simply remove the unused function.