Bug 5094 - Code comments incorrect for param name with two cap letters, i.e. accountID
Summary: Code comments incorrect for param name with two cap letters, i.e. accountID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-05-15 14:23 UTC by Neal
Modified: 2012-05-16 11:30 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Neal 2012-05-15 14:23:51 UTC

I have a method signature such as:

public bool IsFoo(int accountID, string accountUsername)


If you trigger code comments with a /// above the method you'll see how accountID gets entered in comments as accountI

Comment 1 Mike Krüger 2012-05-16 02:20:53 UTC
Works in the current master branch.
Comment 2 Neal 2012-05-16 09:44:38 UTC
What does it show for the code comments such as the description for Account ID?  It will say something like "The AccountI"
Comment 3 Mike Krüger 2012-05-16 10:54:06 UTC
That's what I get:

/// <summary>
/// Determines whether this instance is foo the specified accountID accountUsername.
/// </summary>
/// <returns>
/// <c>true</c> if this instance is foo the specified accountID accountUsername; otherwise, <c>false</c>.
/// </returns>
/// <param name='accountID'>
/// If set to <c>true</c> account I.
/// </param>
/// <param name='accountUsername'>
/// If set to <c>true</c> account username.
/// </param>
public bool IsFoo(int accountID, string accountUsername)
Comment 4 Neal 2012-05-16 11:05:34 UTC
Look at the line:

/// If set to <c>true</c> account I.

It should be:

/// If set to <c>true</c> account ID.
Comment 5 Mike Krüger 2012-05-16 11:30:32 UTC
I don't think that this in scope atm - the comments are generated as start, they should be adjusted manually. The Param name works - and that's the feature.

accountID is a good example of a wrong identifier - according to .NET naming rules it should be accountId - and then the outcome is different:

/// If set to <c>true</c> account identifier.

-  but even that isn't a good comment in this case :(

The automatic comment generation can be improved - and maybe an exception for the ID case can be implemented, but that's not on our to do list atm.

I've implemented it just for .NET names - other casings could produce invalid comments :/

(But I take patches for the addin)