Git Product home page Git Product logo

Comments (26)

evix1101 avatar evix1101 commented on July 20, 2024

Looking into this, new to everything, and while looking for how to make this work. Have VS here so I hope this is what you were after.
Code Analysis : http://hastebin.com/tiperifajo.tex
Code Clones : http://hastebin.com/vibebuviwo.tex

These look a lot better in the VS GUI, but I hope this was of some help, now if I can only figure out how to actually begin to use this. Replacing references in my WindowsGL project doesn't run :(

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

Ooh, neat, I like the analysis. I've rehosted it here:

http://www.flibitijibibo.com/fna/vsanalyze.txt

I'm interested in the Clone check as well, but only for the MG-SDL2 project... SDL2#/MiniTK, Lidgren and TheoraPlay# aren't too important here.

For the WindowsGL->MG-SDL2 transition, be sure your game is XNA4-compliant first, and that the MG-SDL2 project has all the native libs (probably a lot of DllNotFoundExceptions?). That'll be the easiest way to tell if the problem is on our end. Poke me on Twitter if you need help with this.

from fna-mghistory.

extrahotchilipowder avatar extrahotchilipowder commented on July 20, 2024

I'll take care of 2.3 - AvoidConcatenatingCharsRule.

from fna-mghistory.

extrahotchilipowder avatar extrahotchilipowder commented on July 20, 2024

I'd like to try AvoidFloatingPointEqualityRule next. Do you have any preference or ideas on how exactly to tackle this? Looking through the existing code, something like this has been addressed in 3 different files.

1.) In Curve.cs, we just check < Single.Epsilon, which will work, but I've read that in general, that's probably not really what you want.

2.) In Graphics\Viewport.cs, there's a private static function to check WithinEpsilon.

3.) In Ray.cs, Epsilon is just hard coded to 1e-6f.

Since there are 8 different places to fix this defect, seems like it would be nice to have one solution-wide way to define and check if within Epsilon, but I wouldn't just throw something totally new like that into the code without getting the OK from you. Let me know what you think.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

If you want to add an internal method in MathHelper that'd be fine. Given that Curve totally doesn't work at the moment (I base this on a port I have at the moment) I can't say I'd be too heartbroken if the results turned out to be different. If there's an inaccuracy in doing it right, we'll have to do proper tests to nail that down, but since we don't even have the starting point... 🤷

from fna-mghistory.

extrahotchilipowder avatar extrahotchilipowder commented on July 20, 2024

Sounds good, I'll do that.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

The Gendarme reports have been updated for the current revision.

from fna-mghistory.

extrahotchilipowder avatar extrahotchilipowder commented on July 20, 2024

I'll take care of DisposableFieldsShouldBeDisposedRule.

from fna-mghistory.

extrahotchilipowder avatar extrahotchilipowder commented on July 20, 2024

I'm going to take a shot at ReviewCastOnIntegerDivisionRule and ReviewCastOnIntegerMultiplicationRule.

from fna-mghistory.

Datyedyeguy avatar Datyedyeguy commented on July 20, 2024

Taking AvoidArgumentExceptionDefaultConstructorRule.

from fna-mghistory.

Datyedyeguy avatar Datyedyeguy commented on July 20, 2024

Taking AvoidRepetitiveCastsRule

from fna-mghistory.

Datyedyeguy avatar Datyedyeguy commented on July 20, 2024

Taking on DoNotIgnoreMethodResultRule.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

The newly implemented Design namespace, partially pulled from MonoGame added a large amount of warnings from Gendarme. Might be something to look at, as I'm sure the MonoGame team's going to want to know about this too.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

We're almost back to 1900 defects found by Gendarme, so it's probably time to start digging into this again. Lots of MonoGame merges and major rewrites, so there may be some repeat guests from the rules we've been fixing.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

I just applied a new global rule to FNA's Gendarme analysis. We are now ignoring the AvoidRefAndOutParametersRule rule, because it applies to public APIs we cannot change (and honestly, the rule is pretty derpy). This brought the error list down from over 1900 to less than 1500.

Now that we have global custom rulesets, I've added a Gendarme environment that contributors can run and modify:

adef03d

Rules that are found to be useless can be added to the fna.ignore file.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

With the Effect rewrite now in master, all folders except Utilities/ are now open for this task.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

While updating the Gendarme report today I removed the /analyze report, since it's almost a year old. If anyone has this tool, a new report would be great.

from fna-mghistory.

willxinc avatar willxinc commented on July 20, 2024

This what you're looking for?
https://gist.github.com/willxinc/cb8d96f68f0d2c0d72d0

or for a more readable version of the full one:
https://docs.google.com/spreadsheets/d/1iv5PDbqW65d_9QMeWQ_Sac4u2kgMwOcIxchE7J8nIqg/edit#gid=744026683

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

Wow, this is great! That's exactly what I'm looking for (and a whole lot more, too!). Will update the OP with this info.

from fna-mghistory.

willxinc avatar willxinc commented on July 20, 2024

In the spreadsheet, I've filtered out all the common name warnings (CA1702, CA1704, CA1707, CA1709) errors.
Leaving you with 3934 warnings out of the original 12380.
Should I set it to public edit access?

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

I wouldn't worry about edit access - we may add some ignore rules like we did with Gendarme, but that can be figured out as we start going through the actual errors. The only ones we can cut out immediately are any errors involving the third-party libs (SDL2#, OpenAL#, etc.), though the rest might be worth looking at.

Sometimes we can't change a "bug" due to XNA4 spec, but sometimes XNA4 problems get mixed in with problems on our end that we can fix. This happens pretty frequently with things we get directly from Microsoft, like the errors we get in StockEffects despite it being the exact code they shipped in their example sources.

EDIT: Also, does that Community Edition include /analyze as well? I may start adding this to the build process for FNA releases when those start happening (probably not before, though I'd like to have most errors fixed by the time I tag 1.0).

from fna-mghistory.

willxinc avatar willxinc commented on July 20, 2024

The Community Edition should be identical to Pro, which includes the static code analysis feature.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

The Gendarme results have been updated, and the current build is in Coverity's queue now.

FNA's first release is scheduled to be in mid-to-late December, so if anyone wants to burn through some issues before then, go for it.

from fna-mghistory.

willxinc avatar willxinc commented on July 20, 2024

Updated the Visual Studio's Code Analysis spreadsheet by running Visual Studio 2015's Code Analysis on on commit ba5e117:
https://docs.google.com/spreadsheets/d/1BEYIIBYKOsmbV3mScPcDnFZTHa85c1tyXP5WJMwqlM4/edit?usp=sharing

I removed the out / ref rule (to match Gendarme, CA1021, CA1045) as well as the underscores in names and identifier case rules (CA1707, CA1709).
Also filtered out all the warnings that were in ..\lib* although some warnings don't have paths for some reason (done manually using google spreadsheets).

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

Beautiful, thanks. I've updated the OP with the new spreadsheet.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 20, 2024

This issue has been discontinued in favor of the new repository:

FNA-XNA/FNA#1

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.