WFCD / Warframe.NET

Under rewrite: Collection of Warframe libraries for C# developers.
MIT License
22 stars 8 forks source link

Additions & Suggestions #16

Closed VaslD closed 4 years ago

VaslD commented 5 years ago

Glad to see this project is being completely reworked, no offense. Because of that, I'd like to suggest some ground rules that may benefit further developments.

  1. Add a contribution guide, in both human readable texts and source code rules for IDEs (like .EditorConfig, which can be generated by various editors from existing code style preferences).
  2. Add code analyzers.
  3. Since the base library is targeting .NET Standard 1.0 for some reason (which is very very old technology by the way), either create a branch that targets the latest technology, or a project in the same branch that offers extensions to the latest technology. I'm not sure how much bigger this project will grow and how much NetStd 1 will affect later development, for now though I'm really sad that Color property doesn't return a System.Drawing.Color object.
  4. Add XML comments so docs can be at least auto-generated if no one had time to maintain them.

This PR mainly adds Invasion and Faction models with heavy personal flavor. You should probably reject but do consider adding your own rule set before this project attracts too many contributors Tenno.

Erlite commented 5 years ago

Hi! Thanks for the PR. So the reason I've set the target framework to .NET Standard 1.0 is that it allows support for older .NET Frameworks. I'll review your commits for now.

Erlite commented 5 years ago

I'm also not against a contribution guide. Do you have Discord? We have a server for community devs if you'd like to join: https://discord.gg/jGZxH9f

VaslD commented 5 years ago

Thanks for the feedback.

Regarding guidelines and code analyzers, I'm familiar with two of them but there are many more out there. Basically they all find code segment that doesn't conform to rules (rule sets), whether defined by default or in project-level config files, mark them and provide auto-fix if available.

FxCop aims to address core issues, things that may affect performance, security, logic, and so on. From my experience if something was marked by FxCop, they may not work as expected or may have side effects in production. I highly recommend it.

StyleCop addresses styling issues, things like spacing, method/type naming conventions, etc. Configuration is a pain due to so many rules available but once you get done with it (or stick with the default) you can instantly convert between different coding styles (remove "_" prefixes on variables, change Int32s into ints, etc.) and make sure other developers see the squiggle underline when they contribute something outrageous. I don't reference this one on my personal projects but I think a public project is better with it referenced.

I'll fix other issues when I add more models.

VaslD commented 4 years ago

Suggest closing this because the API response has changed since. (And because my previous code had so many problems it seems.)

See: https://github.com/WFCD/Warframe.NET/pull/26. I'll try to keep everything on-par with existing code this time.