These are the YAML language-specific coding styles. Anything mentions here overrides/adds to the "In General" guides.
The extension is .yml.
space as tab instead of \t.NOTE
Maintain tab alignment for consistency. That’s how YAML works.
Follow source code. Otherwise ,use double quote (").
snake_case convention._ instead.:).:).Example:
this_is_a_very_long_string_label: "string"integer: 5float: 10.0boolean: trueKeep it on its own line. You don’t need an inline comment. The label should be self-explanatory.
Example:
# Server launch datedate: "2001-12-14T21:59:43.10-05:00"# NOTdate: "2001-12-14T21:59:43.10-05:00" # This is the server launch datetabulators for consistency and readability.Example:
symfony-1.0: - PHP: 5.0 - Propel: 1.2 - python: - 2.7: 5.2 - 3.3: 4.4symfony-1.2: - PHP: 5.2 - Propel: 1.3<<: to include them.* to call your alias group.Example:
common: &default adapter: postgresql version: 1.0development: <<: *default database: dev_developmenttest: <<: *default database: test_testproduction: <<: *default database: test_production version: 0.5That's all for YAML coding style.