Copilot gives preferential treatment to camelCase naming convention when generating rename suggestions, regardless of the existing convention being used, naming convention of neighboring contextually-relevant functions, or even default language-specific best practices. For example, in a Python file:
It's almost like the rename suggestion prompt assumes everything is JavaScript.
If the current name being sent with the rename suggestion prompt uses snake_case, the rename suggestions should adhere to that. If the naming convention is unclear from the function being renamed (ie def clear(self, key)), either use the surrounding context, or just default to the language's best practice based on the file's selected language type or filename extension.
Compare the results from my basic (naïve) prompt below, which doesn't even mention naming conventions or include other existing function names in the context, to the inline function rename suggestions:
Copilot gives preferential treatment to camelCase naming convention when generating rename suggestions, regardless of the existing convention being used, naming convention of neighboring contextually-relevant functions, or even default language-specific best practices. For example, in a Python file:
It's almost like the rename suggestion prompt assumes everything is JavaScript.
If the current name being sent with the rename suggestion prompt uses snake_case, the rename suggestions should adhere to that. If the naming convention is unclear from the function being renamed (ie
def clear(self, key)
), either use the surrounding context, or just default to the language's best practice based on the file's selected language type or filename extension.Compare the results from my basic (naïve) prompt below, which doesn't even mention naming conventions or include other existing function names in the context, to the inline function rename suggestions: