Changes between Version 50 and Version 51 of Coding_Conventions


Ignore:
Timestamp:
Aug 16, 2020, 12:45:45 PM (4 years ago)
Author:
Nescio
Comment:

add link to English style guide; minor formatting

Legend:

Unmodified
Added
Removed
Modified
  • Coding_Conventions

    v50 v51  
    1414
    1515== Common ==
    16 
    17 - Use the US variant of English when choosing variable names. For example, use 'color' instead of 'colour'.
     16 * Use the US variant of English when choosing variable names. For example, use 'color' instead of 'colour'. See also the [[EnglishStyleGuide#Englishspelling|English style guide]].
    1817
    1918
     
    252251
    253252
    254 === Misc ===
     253=== Miscellaneous ===
    255254 * In header files, avoid `#include` and use forward declarations wherever possible.
    256255
     
    430429
    431430
    432 == JSON==
    433 * Basically follow the JS formatting conventions
    434 * When on the same line, insert spaces after `{`, and `:` and before `}`, but not after `[` or before `]`; e.g. `{ "foo": "bar" }` and `["foo", "bar"]`
    435 * Use tabs for indentation, not spaces
     431== JSON ==
     432 * Basically follow the JS formatting conventions.
     433 * When on the same line, insert spaces after `{`, and `:` and before `}`, but not after `[` or before `]`; e.g. `{ "foo": "bar" }` and `["foo", "bar"]`.
     434 * Use tabs for indentation, not spaces.
    436435
    437436
     
    439438 * All XML files should start with
    440439{{{
    441 <?xml version="1.0" encoding="utf-8"?>
     440<?xml version="1.0" encoding="UTF-8"?>
    442441}}}
    443442   and be UTF-8 encoded (preferably without a BOM but that doesn't really matter).
    444 
    445443 * Empty-element tags should be written without a trailing space: use `<foo/>` or `<foo bar="baz"/>`, not `<foo />` nor `<foo bar="baz" />`.
    446 
    447444 * Indent using whatever the similar existing XML files use. (Usually two spaces; sometimes four spaces, or tabs, etc.)
    448445
     
    464461}}}
    465462 * File extensions for shaders:
    466     * `.fs` - fragment shader
    467     * `.vs` - vertex shader
    468     * `.gs` - geometry shader
    469     * `.cs` - compute shader
     463   * `.fs` - fragment shader
     464   * `.vs` - vertex shader
     465   * `.gs` - geometry shader
     466   * `.cs` - compute shader
    470467 * All GLSL files should start with right [[https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#Version|version]].
    471468{{{