Skip to content

Commit b9f9b68

Browse files
author
Kapil Borle
authored
Merge pull request #788 from rkeithhill/rkeithhill/add-stroustrup-format-settings
Add settings for Stroustrup style.
2 parents 662d961 + 1006cee commit b9f9b68

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Inspired by http://eslint.org/docs/rules/brace-style#stroustrup
2+
@{
3+
IncludeRules = @(
4+
'PSPlaceOpenBrace',
5+
'PSPlaceCloseBrace',
6+
'PSUseConsistentWhitespace',
7+
'PSUseConsistentIndentation',
8+
'PSAlignAssignmentStatement'
9+
)
10+
11+
Rules = @{
12+
PSPlaceOpenBrace = @{
13+
Enable = $true
14+
OnSameLine = $true
15+
NewLineAfter = $true
16+
IgnoreOneLineBlock = $true
17+
}
18+
19+
PSPlaceCloseBrace = @{
20+
Enable = $true
21+
NewLineAfter = $true
22+
IgnoreOneLineBlock = $true
23+
NoEmptyLineBefore = $false
24+
}
25+
26+
PSUseConsistentIndentation = @{
27+
Enable = $true
28+
IndentationSize = 4
29+
}
30+
31+
PSUseConsistentWhitespace = @{
32+
Enable = $true
33+
CheckOpenBrace = $true
34+
CheckOpenParen = $true
35+
CheckOperator = $true
36+
CheckSeparator = $true
37+
}
38+
39+
PSAlignAssignmentStatement = @{
40+
Enable = $true
41+
CheckHashtable = $true
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)