Official style guides, language by language
The guide each language’s own people publish on how its code should look, with the indent, the line length and the formatter it names.
Which guide does each language follow?
MDN writes its rules for its own examples source; Oracle last revised Java’s in 1999 source.
What indent and line length does each set?
| Language | Indent | Line length |
|---|---|---|
| Python source | 4 spaces | 79 characters |
| Java source | 4 spaces | 80 characters |
| JavaScript | not quoted | not quoted |
| TypeScript | not quoted | not quoted |
| C# source | 4 spaces | not quoted |
| Go source | tabs | no limit |
| Rust source | 4 spaces | 100 characters |
| Kotlin source | 4 spaces | not quoted |
| Dart source | not quoted | 80 characters |
| SAP ABAP source | not quoted | 120 characters |
Not quoted: the pages we quote do not set it.