Skip to content

Commit ff72dde

Browse files
author
Quintin Willison
authored
Merge pull request ably#616 from ably/feature/tabs-to-spaces-config
Update EditorConfig
2 parents cbbccba + 0aecd90 commit ff72dde

3 files changed

Lines changed: 20 additions & 11 deletions

File tree

.editorconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ end_of_line = lf
66
insert_final_newline = true
77
trim_trailing_whitespace = true
88
charset = utf-8
9-
indent_style = tab
9+
indent_style = space
10+
indent_size = 2
11+
12+
[*.java]
13+
indent_style = space
14+
indent_size = 4
1015

1116
[*.md]
1217
trim_trailing_whitespace = false
13-

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,11 @@ You can run just the Checkstyle rules on their own using:
497497

498498
./gradlew checkstyleMain
499499

500+
We have a root [`.editorconfig`](.editorconfig) file, supporting [EditorConfig](https://editorconfig.org/), which should be of assistance within most IDEs. e.g.:
501+
502+
- [VS Code](https://code.visualstudio.com/) using the [EditorConfig plugin](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
503+
- [IntelliJ IDEA](https://www.jetbrains.com/idea/) using the [bundled plugin](https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig).
504+
500505
## Tests
501506

502507
A gradle wrapper is included so these tasks can run without any prior installation of gradle. The Linux/OSX form of the commands, given below, is:

config/checkstyle/checkstyle.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4-
"https://checkstyle.org/dtds/configuration_1_3.dtd">
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
55

66
<module name="Checker">
7-
<property name="charset" value="UTF-8"/>
7+
<property name="charset" value="UTF-8"/>
88

9-
<module name="FileTabCharacter"/>
9+
<module name="FileTabCharacter"/>
1010

11-
<module name="TreeWalker">
12-
<module name="RedundantModifier"/>
13-
<module name="UnusedImports"/>
14-
<module name="AvoidStarImport"/>
15-
</module>
11+
<module name="TreeWalker">
12+
<module name="RedundantModifier"/>
13+
<module name="UnusedImports"/>
14+
<module name="AvoidStarImport"/>
15+
</module>
1616
</module>

0 commit comments

Comments
 (0)