Skip to content

Commit

Permalink
Use goimports for Go import auto formatting
Browse files Browse the repository at this point in the history
To improve the formatting and adhere to Arctic Ice Studio's Go code
style `goimports` (1) is now used to automatically format imports:

- Only use one import declaration.
- Use of the `-local` flag to put imports local imports after 3rd-party packages.
- Move all stdlib imports into one group.
- Sort all imports.

References:
  (1) https://godoc.org/golang.org/x/tools/cmd/goimports

Resolves GH-195
  • Loading branch information
arcticicestudio committed Mar 30, 2019
1 parent a3d062a commit 8a02ae7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 37 deletions.
5 changes: 5 additions & 0 deletions snowblocks/jetbrains/codestyles/arctic-codestyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ License: MIT
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<GoCodeStyleSettings>
<option name="ADD_LEADING_SPACE_TO_COMMENTS" value="true" />
<option name="IMPORT_SORTING" value="GOIMPORTS" />
<option name="MOVE_ALL_IMPORTS_IN_ONE_DECLARATION" value="true" />
<option name="MOVE_ALL_STDLIB_IMPORTS_IN_ONE_GROUP" value="true" />
<option name="GROUP_STDLIB_IMPORTS" value="true" />
<option name="GROUP_CURRENT_PROJECT_IMPORTS" value="true" />
</GoCodeStyleSettings>
<GroovyCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
Expand Down
2 changes: 0 additions & 2 deletions snowblocks/jetbrains/disabled_plugins.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
AngularJS
AntSupport
CFML Support
CVS
CloudBees
CloudFoundry
DevKit
Expand All @@ -20,7 +19,6 @@ Refactor-X
Resin
StrutsAssistant
Subversion
TFS
TestNG-J
WebSphere
Weblogic
Expand Down
72 changes: 37 additions & 35 deletions snowblocks/jetbrains/snowblock.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,244 +3,246 @@
"clean": [
"~/Library/Preferences/IntelliJIdea2018.2",
"~/Library/Preferences/IntelliJIdea2018.3",
"~/Library/Preferences/IntelliJIdea2019.1",
"~/.IntelliJIdea2018.2",
"~/.IntelliJIdea2018.3"
"~/.IntelliJIdea2018.3",
"~/.IntelliJIdea2019.1"
]
},
{
"link": {
"~/Library/Preferences/IntelliJIdea2018.3/codestyles/arctic-codestyle.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/codestyles/arctic-codestyle.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "codestyles/arctic-codestyle.xml"
}
},
"~/.IntelliJIdea2018.3/codestyles/arctic-codestyle.xml": {
"~/.IntelliJIdea2019.1/codestyles/arctic-codestyle.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "codestyles/arctic-codestyle.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/inspection/arctic-inspections.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/inspection/arctic-inspections.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "inspection/arctic-inspections.xml"
}
},
"~/.IntelliJIdea2018.3/inspection/arctic-inspections.xml": {
"~/.IntelliJIdea2019.1/inspection/arctic-inspections.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "inspection/arctic-inspections.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/keymaps/arctic-keymap.macos.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/keymaps/arctic-keymap.macos.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "keymaps/arctic-keymap.macos.xml"
}
},
"~/.IntelliJIdea2018.3/keymaps/arctic-inspections.xml": {
"~/.IntelliJIdea2019.1/keymaps/arctic-inspections.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "keymaps/arctic-keymap.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/code.style.schemes.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/code.style.schemes.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/code.style.schemes.xml"
}
},
"~/.IntelliJIdea2018.3/options/code.style.schemes.xml": {
"~/.IntelliJIdea2019.1/options/code.style.schemes.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/code.style.schemes.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/colors.scheme.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/colors.scheme.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/colors.scheme.xml"
}
},
"~/.IntelliJIdea2018.3/options/colors.scheme.xml": {
"~/.IntelliJIdea2019.1/options/colors.scheme.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/colors.scheme.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/customization.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/customization.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/customization.xml"
}
},
"~/.IntelliJIdea2018.3/options/customization.xml": {
"~/.IntelliJIdea2019.1/options/customization.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/customization.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/editor.codeinsight.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/editor.codeinsight.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/editor.codeinsight.xml"
}
},
"~/.IntelliJIdea2018.3/options/editor.codeinsight.xml": {
"~/.IntelliJIdea2019.1/options/editor.codeinsight.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/editor.codeinsight.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/editor.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/editor.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/editor.xml"
}
},
"~/.IntelliJIdea2018.3/options/editor.xml": {
"~/.IntelliJIdea2019.1/options/editor.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/editor.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/goLibraries.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/goLibraries.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/goLibraries.xml"
}
},
"~/.IntelliJIdea2018.3/options/goLibraries.xml": {
"~/.IntelliJIdea2019.1/options/goLibraries.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/goLibraries.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/ide.general.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/ide.general.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/ide.general.xml"
}
},
"~/.IntelliJIdea2018.3/options/ide.general.xml": {
"~/.IntelliJIdea2019.1/options/ide.general.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/ide.general.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/keymap.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/keymap.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/keymap.xml"
}
},
"~/.IntelliJIdea2018.3/options/keymap.xml": {
"~/.IntelliJIdea2019.1/options/keymap.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/keymap.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/laf.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/laf.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/laf.xml"
}
},
"~/.IntelliJIdea2018.3/options/laf.xml": {
"~/.IntelliJIdea2019.1/options/laf.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/laf.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/options.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/options.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/options.xml"
}
},
"~/.IntelliJIdea2018.3/options/options.xml": {
"~/.IntelliJIdea2019.1/options/options.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/options.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/project.default.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/project.default.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/project.default.xml"
}
},
"~/.IntelliJIdea2018.3/options/project.default.xml": {
"~/.IntelliJIdea2019.1/options/project.default.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/project.default.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/options/ui.lnf.xml": {
"~/Library/Preferences/IntelliJIdea2019.1/options/ui.lnf.xml": {
"create": true,
"force": true,
"hosts": {
"iceowl": "options/ui.lnf.xml"
}
},
"~/.IntelliJIdea2018.3/options/ui.lnf.xml": {
"~/.IntelliJIdea2019.1/options/ui.lnf.xml": {
"create": true,
"force": true,
"hosts": {
"igloo": "options/ui.lnf.xml"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/disabled_plugins.txt": {
"~/Library/Preferences/IntelliJIdea2019.1/disabled_plugins.txt": {
"create": true,
"force": true,
"hosts": {
"iceowl": "disabled_plugins.txt"
}
},
"~/.IntelliJIdea2018.3/disabled_plugins.txt": {
"~/.IntelliJIdea2019.1/disabled_plugins.txt": {
"create": true,
"force": true,
"hosts": {
"igloo": "disabled_plugins.txt"
}
},
"~/Library/Preferences/IntelliJIdea2018.3/disabled_update.txt": {
"~/Library/Preferences/IntelliJIdea2019.1/disabled_update.txt": {
"create": true,
"force": true,
"hosts": {
"iceowl": "disabled_update.txt"
}
},
"~/.IntelliJIdea2018.3/disabled_update.txt": {
"~/.IntelliJIdea2019.1/disabled_update.txt": {
"create": true,
"force": true,
"hosts": {
Expand Down

0 comments on commit 8a02ae7

Please sign in to comment.