Style Standards =============== Consistency is one of our goals for development and that is the reason why we need standards. Common standards must be applied to all other more specific standards if any rule is not overridden. Following these rules, there will be automatic checking tool to report any rule violations. Common Standards ---------------- #. Line length limit must be within 100 characters (80 characters limit is recommended) #. 4 spaces for indentation; no tab character is allowed #. No trailing whitespace #. An empty newline at the end of file Document Standards ------------------ C/C++ Coding Standards ---------------------- Python Coding Standards ----------------------- - Unless specified, follow `PEP 8 `_ - Follow `Google Python Style Guide `_ - Follow http://www.python.org/dev/peps/pep-0257/ for docs string - Style checking tools: + https://pypi.python.org/pypi/pep8 + https://pypi.python.org/pypi/pyflakes (includes pep8) + http://www.pylint.org/ + http://pychecker.sourceforge.net - See more links: + http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html + http://deeplearning.net/software/pylearn/v2_planning/API_coding_style.html + http://docs.python-guide.org/en/latest/writing/style/ + http://docs.ckan.org/en/latest/python-coding-standards.html + http://courses.cms.caltech.edu/cs11/material/python/misc/python_style_guide.html + https://sites.google.com/a/khanacademy.org/forge/for-developers/styleguide/python + https://dev.launchpad.net/PythonStyleGuide Java Coding Standards --------------------- - Follow `Code Conventions for the Java TM Programming Language `_ - Follow `Google Java Style `_ but must use **4 spaces** for indentation - Style checking tools: + http://checkstyle.sourceforge.net/ + http://pmd.sourceforge.net/ + http://findbugs.sourceforge.net/ + http://cobertura.github.io/cobertura/ - Interesting links: + http://www.javacodegeeks.com/2012/10/java-code-quality-tools-overview.html JavaScript Coding Standards --------------------------- - Follow `Google JavaScript Style Guide `_ but must use **4 spaces** for indentation - Style checking tools: + http://www.jshint.com/ - Interesting links: + http://addyosmani.com/blog/javascript-style-guides-and-beautifiers/ + http://www.jshint.com/ HTML, CSS Coding Standards -------------------------- - Follow `Google HTML/CSS Style Guide `_ but must use **4 spaces** for indentation - This apply for CSS pre-processors like `SASS `_, `LESS `_, `Stylus `_, etc. - Style checking tools: + https://github.com/praveenvijayan/grunt-html-validation Ruby Coding Standards --------------------- PHP Coding Standards -------------------- Objective C Coding Standards ---------------------------- XML Coding Standards --------------------