Skip to content

Commit c085220

Browse files
committed
Enforce tabs for indentation.
1 parent 5c55017 commit c085220

4 files changed

Lines changed: 37 additions & 9 deletions

File tree

ICSharpCode.AvalonEdit.Sample/Properties/WPFAssemblyInfo.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99

10-
//In order to begin building localizable applications, set
10+
//In order to begin building localizable applications, set
1111
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
1212
//inside a <PropertyGroup>. For example, if you are using US english
1313
//in your source files, set the <UICulture> to en-US. Then uncomment
@@ -18,10 +18,10 @@
1818

1919

2020
[assembly: ThemeInfo(
21-
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
22-
//(used if a resource is not found in the page,
23-
// or application resource dictionaries)
24-
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
25-
//(used if a resource is not found in the page,
26-
// app, or any theme specific resource dictionaries)
21+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
22+
//(used if a resource is not found in the page,
23+
// or application resource dictionaries)
24+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
25+
//(used if a resource is not found in the page,
26+
// app, or any theme specific resource dictionaries)
2727
)]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import os, sys
2+
3+
def check(filename):
4+
ok = True
5+
with open(filename, 'r') as f:
6+
for i, line in enumerate(f):
7+
if line.startswith(' '):
8+
print('{}:{}: Line starting with spaces. Use tabs for indentation instead!'.format(filename, i+1))
9+
ok = False
10+
return ok
11+
12+
def main():
13+
dir = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
14+
ok = True
15+
for root, dirs, files in os.walk(dir):
16+
if '\\obj\\' in root:
17+
continue
18+
for filename in files:
19+
if filename.lower().endswith('.cs') or filename.lower().endswith('.xaml'):
20+
if not check(os.path.join(root, filename)):
21+
ok = False
22+
print('Tidy check: {}'.format('successful' if ok else 'failed'))
23+
return 0 if ok else 1
24+
25+
if __name__ == '__main__':
26+
sys.exit(main())

ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
2020
</Border>
2121
<!-- Simplified triggers:
22-
we don't want a gray selection background when the ListBox doesn't have focus
22+
we don't want a gray selection background when the ListBox doesn't have focus
2323
-->
2424
<ControlTemplate.Triggers>
2525
<Trigger Property="IsSelected" Value="true">

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ before_build:
66
build:
77
project: ICSharpCode.AvalonEdit.sln
88
parallel: true
9-
verbosity: minimal
9+
verbosity: minimal
10+
after_test:
11+
- python ICSharpCode.AvalonEdit.Tests\tidy.py

0 commit comments

Comments
 (0)