Create a document to explain coding standards
In order to have every contributors to comply to the same coding conventions, it would be interesting to have a small document explaining the conversions already in use (indentation realized with tab char, no tab char inside comments, and so on).
One example can be : http://javascript.crockford.com/code.html
Very interesting document. It may be a little generic, some specific MelonJS coding standards would be more efficient, beginning with a diagram of how all classes interact together (I'm sure Olivier got that scribbled on a ripped piece of paper somewhere... Or maybe a clean document if he's more organized than I am), some insight on how inheritance is implemented, etc...
@lancelot : am I right, or we just did the opposite ? :):):) "The unit of indentation is four spaces. Use of tabs should be avoided because (as of this writing in the 21st Century) there still is not a standard for the placement of tabstops"
@ben2303 : effectively, that's a good point... and yes I have it somewhere and I should take the time to write something. A least a visio diagram, let's see after for the clean document ! Actually I was hoping to get this generated with jsDoc (to show the inheritance tree, and how classes are interacting), it's good to generate the documentation, but for more, it's not really working as I was expecting to.
While lookng for a JS beautifier, I stumbled upon http://jslint.com/ , looks very interesting (no command line though or I missed it). Guess an Eclipse plugin doing the same things should exist somewhere :/ Edit : should read a little better... : https://github.com/douglascrockford/JSLint
Has any progress been made with this? Because, I would like to know what, if any, coding standards there are. The two links above are nice, but don't really give any explanation. Thanks,
Except for the complete reformatting of the source code, no, no major changes to coding standard except for the 2 mentioned links :)
In the mean time and to be objectives, seeing the very low amount of significative code contribution on this project, so far it's not really a problem. If later contributions are reaching a higher level, it will then be time to talk again about this, and ensure everybody is on the same page. Until that, provide some code that works and more or less looks like the here mentioned standard and/or the rest of melonJS is already awesome !
On 17 oct. 2011, at 23:29, rberrett [email protected] wrote:
Has any progress been made with this? Because, I would like to know what, if any, coding standards there are. The two links above are nice, but don't really give any explanation. Thanks,
Reply to this email directly or view it on GitHub: https://github.com/obiot/melonJS/issues/14#issuecomment-2430111
I'm closing this ticket, we don't need documentation about how to write clean Javascript (this is not the purpose of the library), but we however need to ensure that the library is properly written. So I will open a new one to integrate something like JSLint into the build process (that could then be used as well for other projects using melonJS).