Skip to content

Commit

Permalink
Enforce space after // (IDEA settings) (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Shyiko committed Feb 12, 2019
1 parent a8ea938 commit cd3cfc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ Go to <kbd>File</kbd> -> <kbd>Settings...</kbd> -> <kbd>Editor</kbd>
- check `Optimize imports on the fly (for current project)`.
- <kbd>Code Style</kbd> -> <kbd>Kotlin</kbd>
- <kbd>Set from...</kbd> -> <kbd>Predefined style</kbd> -> <kbd>Kotlin style guide</kbd> (Kotlin plugin 1.2.20+).
- open <kbd>Code Generation</kbd> tab
- uncheck `Line comment at first column`;
- select `Add a space at comment start`.
- open <kbd>Imports</kbd> tab
- select `Use single name import` (all of them);
- remove `import java.util.*` from `Packages to Use Import with '*'`.
Expand Down
2 changes: 2 additions & 0 deletions ktlint/src/main/resources/config/codestyles/ktlint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
Expand Down

0 comments on commit cd3cfc8

Please sign in to comment.