ste10k41 / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
1 stars 0 forks source link

[Enhancement] Static code analysis #83

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Now that I am finally done with my school exams I got around writing some 
patches. I have used Gendarme (https://github.com/spouliot/gendarme/) as the 
code analysis tool and started with the low hanging fruit and relatively easy 
things to fix. 

The next things on my list are the IComapre interface, it is not implemented 
everywhere correctly and the issues related to IDispose and disposable classes.

I have made a seperate patch for every fix I made and mirrored it all in my 
bitbucket account https://bitbucket.org/andresteenveld/nettoplogysuite/

Notes for compare_floats.patch
https://github.com/spouliot/gendarme/wiki/Gendarme.Rules.Correctness.AvoidFloati
ngPointEqualityRule(2.10)

Notes for exception_constructors.patch
https://github.com/spouliot/gendarme/wiki/Gendarme.Rules.Exceptions.MissingExcep
tionConstructorsRule(2.10)

Notes for public_constants.patch
https://github.com/spouliot/gendarme/wiki/Gendarme.Rules.BadPractice.AvoidVisibl
eConstantFieldRule(2.10)

And I fixed some random compiler warnings that were there.

Some things I saw when coding:
 - RTools_NTS.Util.Token #625 - Just unboxing obj to double could cause an casting exception if obj is not a double.
 - DoubleBits, refactor to extention methods?

Original issue reported on code.google.com by Andre.Steenveld on 23 Jun 2011 at 6:27

Attachments:

GoogleCodeExporter commented 8 years ago
I'm comfortable with patches regarding
- exception constructor
- public constants
- and compiler warnings

I hesitate with the compare floats/doubles patch, since I cannot estimate the 
impact on the library in terms of performance and robustness. I fear we get 
differences in results as compared to the original JTS version.

Any other comments?

Original comment by felix.ob...@netcologne.de on 7 Jul 2011 at 10:32

GoogleCodeExporter commented 8 years ago
PS. I hope the exams went well :)

Original comment by felix.ob...@netcologne.de on 7 Jul 2011 at 10:33