[Mono-bugs] [Bug 605545] Add support of string resources to ProvideCorrectArgumentsToFormattingMethodsRule

2010-08-06 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605545

http://bugzilla.novell.com/show_bug.cgi?id=605545#c4


Sebastien Pouliot spoul...@novell.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||spoul...@novell.com
 Resolution||FIXED

--- Comment #4 from Sebastien Pouliot spoul...@novell.com 2010-08-06 15:12:49 
UTC ---
Bonjour Antoine,

I don't get the failure from AvoidCodeDuplicatedInSameClassRule - that's likely
a windows-only (well CSC) defect. I guess I'll spot it later when I go back to
a windows VM.

As for the PreferEmptyInstanceOverNullRule defects I added new ignore entries
for them (there are already some similar to this).

I also made a few, mostly minor, changes:

GetLoadStringFormatInstruction: Use a swicth/case to add Callvirt (since some
compilers use callvirt even when a call would be valid).

GetResourceNameFromResourceGetter: Added a comment about this working only for
generated code

GetLoadStringFromCall: Change signature and avoid calling Resolve 2 times on a
MethodReference.

IsResource: Use IsGetter property instead of IsProperty method (faster and more
precise)

and, finally, I added your name to the rule and tests authors and in Gendarme's
main AUTHORS file :-)

pushed as b1a5eb301e9847100c9a018ccd09123d1bde44b0 on master

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605545] Add support of string resources to ProvideCorrectArgumentsToFormattingMethodsRule

2010-07-04 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605545

http://bugzilla.novell.com/show_bug.cgi?id=605545#c3


--- Comment #3 from Antoine Vandecrème avandecr...@sopragroup.com 2010-07-04 
14:43:49 UTC ---
Created an attachment (id=373717)
 -- (http://bugzilla.novell.com/attachment.cgi?id=373717)
fix remarks

Here is a new patch fixing the previous remarks.

This patch produces new gendarme defects :

-AvoidCodeDuplicatedInSameClassRule : 
I don't know why this rule fired.
Maybe because there is in both method a line like :
MethodReference mr = (call.Operand as MethodReference);


-PreferEmptyInstanceOverNullRule :
I really need to return null and not String.Empty because null means the string
resource is not found. A String.Empty value means the string found is
string.Empty.
I don't know what is the best practice here. Maybe method such as :
bool TryGetString(out string result)

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605545] Add support of string resources to ProvideCorrectArgumentsToFormattingMethodsRule

2010-05-22 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605545

http://bugzilla.novell.com/show_bug.cgi?id=605545#c2


--- Comment #2 from Sebastien Pouliot spoul...@novell.com 2010-05-22 15:26:02 
UTC ---
Created an attachment (id=363971)
 -- (http://bugzilla.novell.com/attachment.cgi?id=363971)
commented patch

Here's the comments (sorry for the delay). Mostly minor (style), some things to
measure (LINQ) and one thing to complete (string length).

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605545] Add support of string resources to ProvideCorrectArgumentsToFormattingMethodsRule

2010-05-14 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605545

http://bugzilla.novell.com/show_bug.cgi?id=605545#c1


--- Comment #1 from Sebastien Pouliot spoul...@novell.com 2010-05-15 00:03:04 
UTC ---
Created an attachment (id=362414)
 -- (http://bugzilla.novell.com/attachment.cgi?id=362414)
makefile patch

Very nice feature addition! Here's the build change to make it work under Mono
(consider it beta since I have not tried 'make distcheck' on it ;-). 

I got some comments about your patch - if you have a more recent version then
I'll review it (instead of this one). Thanks!

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs