Skip to content

Commit 25f8db7

Browse files
committed
added ExtendedEmptyLines docs
1 parent f337e04 commit 25f8db7

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

_data/haxe-checkstyle/haxe-checkstyle_sidebar.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ entries:
285285
url: /haxe-checkstyle/emptylines.html
286286
output: web
287287

288+
- title: Extended Empty Lines
289+
url: /haxe-checkstyle/extendedemptylines.html
290+
output: web
291+
288292
- title: Indentation
289293
url: /haxe-checkstyle/indentation.html
290294
output: web

haxe-checkstyle/extendedemptylines.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Extended Empty Lines
3+
toc: false
4+
---
5+
6+
Checks for consecutive empty lines. (available since 2.4.0)
7+
8+
### Configuration
9+
10+
```json
11+
{
12+
"type": "EmptyLines",
13+
"props": {
14+
"defaultPolicy": "none",
15+
"ignore": [],
16+
"none": [
17+
"beginClass",
18+
"betweenImports"
19+
],
20+
"exact": [
21+
"afterPackage",
22+
"afterImports"
23+
],
24+
"upto": [],
25+
"atleast": [],
26+
"max": 1,
27+
"skipSingleLineTypes": true,
28+
"severity": "INFO"
29+
}
30+
}
31+
```
32+
33+
`max` defines the number of empty lines for `exact`, `upto` and `atleast` policies.
34+
To ignore single line typ definitions set `skipSingleLineTypes` to `true`.
35+
`defaultPolicy` defines the policy to use for all places that are not listed in `ignore`, `none`, `exact`, `upto` and `atleast` arrays.
36+
37+
| defaultPolicy | |
38+
| -------------- | -------------------------------------------------- |
39+
| `ignore` | ignores all entries |
40+
| `none` | no empty line allowed |
41+
| `exact` | exactly `max` empty line(s) required |
42+
| `upto` | up to `max` empty line(s) allowed (0 - `max`) |
43+
| `atleast` | at least `max` empty lines required |
44+
45+
`ignore`, `none`, `exact`, `upto` and `atleast` arrays must contain places from the following table:
46+
47+
| places | |
48+
| ---------------------------- | ---------------------------------------------------------- |
49+
| `beforePackage` | before package |
50+
| `afterPackage` | after package |
51+
| `betweenImports` | between imports/usings |
52+
| `beforeUsing` | before using block |
53+
| `afterImports` | after all imports/usings |
54+
| `anywhereInFile` | anywhere in file |
55+
| `betweenTypes` | betgween two types |
56+
| `beforeFileEnd` | before EOF |
57+
| `inFunction` | anywhere inside function body |
58+
| `afterLeftCurly` | after left curly |
59+
| `beforeRightCurly` | before right curly |
60+
| `typeDefinition` | between type and left curly |
61+
| `beginClass` | after class left curly |
62+
| `endClass` | before class right curly |
63+
| `afterClassStaticVars` | after static class var block |
64+
| `afterClassVars` | after class var block |
65+
| `betweenClassStaticVars` | between static class vars |
66+
| `betweenClassVars` | between class vars |
67+
| `betweenClassMethods` | between class methods |
68+
| `beginAbstract` | after abstract left curly |
69+
| `endAbstract` | before abstract right curly |
70+
| `afterAbstractVars` | after abstract var block |
71+
| `betweenAbstractVars` | between abstract vars |
72+
| `betweenAbstractMethods` | between abstract methods |
73+
| `beginInterface` | after interface left curly |
74+
| `endInterface` | before interface right curly |
75+
| `betweenInterfaceFields` | between interface fields |
76+
| `beginEnum` | after enum left curly |
77+
| `endEnum` | before enum right curly |
78+
| `betweenEnumFields` | between enum fields |
79+
| `beginTypedef` | after typedef left curly |
80+
| `endTypedef` | before typedef right curly |
81+
| `betweenTypedefFields` | between typedef fields |
82+
| `afterSingleLineComment` | after single line comment |
83+
| `afterMultiLineComment` | after multi line comment |

0 commit comments

Comments
 (0)