-
Notifications
You must be signed in to change notification settings - Fork 1
Coding Style Elements vs. Source Code Elements
Here is the mapping between coding style elements and source code elements we have planned to cover. Initially, we intend to keep a single table for Java and Python (the PLs we're working on). Perhaps, as the project evolves, we will need to create a specific mapping for each language. Let's try to keep it updated to represent what actually we have covered. Later we can also mark the future elements we may cover during future iterations of this project.
| Class | Pkg decl. | Import stmts. | Constants | Variables | Methods or Functions | Control stmts. | |
|---|---|---|---|---|---|---|---|
| Blank lines | x | x | |||||
| Curly brackets | x | x | x | ||||
| Indentation | x | x | x | ||||
| Tabs vs. space | x | x | x | x | x | ||
| Line length | x | x | x | x | x | x | x |
| Import | x | ||||||
| Naming | x | x | x | x | x | ||
| File encoding | x |
Metric: Number of spaces (numeric scale: integer) for indentation following a class declaration. Google Java style guide recommends: +2 spaces (2 spaces per level) Python (PEP 8) style guide recommends: +4 spaces (4 spaces per level)
Metric: Number of spaces (numeric scale: integer) for indentation following a method/function declaration. Google Java style guide recommends: +2 spaces (2 spaces per level) Python (PEP 8) style guide recommends: +4 spaces (4 spaces per level)
Metric: Number of spaces (numeric scale: integer) for indentation following a control statement. Google Java style guide recommends: +2 spaces (2 spaces per level) Python (PEP 8) style guide recommends: +4 spaces (4 spaces per level)
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??
Metric: ??.
Google Java style guide recommends: ??
Python (PEP 8) style guide recommends: ??