File: LEGACY_CODING_STYLE.txt

package info (click to toggle)
junit4 4.13.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,520 kB
  • sloc: java: 31,097; javascript: 1,339; xml: 751; makefile: 2; sh: 1
file content (132 lines) | stat: -rw-r--r-- 2,719 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
==================================
Coding style
==================================

----------------------------------
Tabs and Indents
----------------------------------
* Tab size : 4
* Indent : 4
* Continuation indent : 8
* Label indent : 0

> Don't use tab characters.

----------------------------------
Spaces
----------------------------------
Before Parentheses
* if parentheses
* for parentheses
* while parentheses
* switch parentheses
* try parentheses
* catch parentheses
* synchronized parentheses

Around Operators
* Assignment operators (=, +=, …)
* Logical operators (&&, ||)
* Equality operators (==, !=)
* Relational operators (<, >, <=, >=)
* Bitwise operators (&, |, ^)
* Additive operators (+, -)
* Multiplicative operators (*, /, %)
* Shift operators (<<, >>, >>>)

Before Left Brace
* Class left brace
* Method left brace
* if left brace
* else left brace
* for left brace
* while left brace
* do left brace
* switch left brace
* try left brace
* catch left brace
* finally left brace
* synchronized left brace

Before Keywords
* else keyword
* while keyword
* catch keyword
* finally keyword

In Ternary Operator (?:)
* Before ?
* After ?
* Before :
* After :

Within Type Arguments
* After comma

Other
* After comma
* After semicolon
* After type cast

----------------------------------
Wrapping and Braces
----------------------------------
Braces placement
* In class declaration : End of line
* In method declaration : End of line
* Other : End of line

Use Of Braces
* if() statement : When multiline
* for() statement : When multiline
* while() statement : When multiline
* do .. while() statement : When multiline

Annotations
* Class annotations : Wrap always
* Method annotations : Wrap always
* Field annotations : Wrap always
* Parameter annotations : Do not wrap
* Local variable annotations : Do not wrap

----------------------------------
Blank Lines
----------------------------------
Minimum Blank Lines
* Before package statement : 0
* After package statement : 1
* Before imports : 1
* After imports : 1
* Around class : 1
* After class header : 0
* After anonymous class header : 0
* Around field in interface : 0
* Around field : 0
* Around method in interface : 1
* Around method : 1
* Before method body : 0 

----------------------------------
JavaDoc
----------------------------------
Alignment
* Align thrown exception descriptions

Blank Lines
* After description

Other
* Enable leading asterisks
* Use @throws rather than @exception
* Keep empty lines

----------------------------------
Imports
----------------------------------
import static (all other imports)
<blank line>
import java.*
import javax.*
import com.*
<blank line> 
import (all other imports)