Skip to content

Commit a3bc78b

Browse files
authored
fix: update devcontainer.json to new format (#978)
* fix: update devcontainer.json to new format chore: update checkstyle version style: fix xml and json tab settings * chore: checkstyle, match default import order
1 parent 58fc099 commit a3bc78b

File tree

3 files changed

+58
-61
lines changed

3 files changed

+58
-61
lines changed

.devcontainer/devcontainer.json

+36-47
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,40 @@
1515
"NODE_VERSION": "lts/*"
1616
}
1717
},
18-
1918
// Set *default* container specific settings.json values on container create.
20-
//"settings": {
21-
// "java.home": "/docker-java-home"
22-
//},
23-
"settings": {
24-
"java.configuration.updateBuildConfiguration": "interactive",
25-
"[java]": {
26-
"editor.defaultFormatter": "redhat.java",
27-
"editor.formatOnSave": true,
28-
"editor.tabSize": 2,
29-
"editor.insertSpaces": true,
30-
"editor.detectIndentation": false
31-
},
32-
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
33-
"java.saveActions.organizeImports": true,
34-
"editor.tabSize": 2,
35-
"editor.insertSpaces": true,
36-
"editor.detectIndentation": false,
37-
"java.checkstyle.version": "10.3",
38-
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
39-
},
40-
41-
42-
// Add the IDs of extensions you want installed when the container is created.
43-
"extensions": [
44-
"vscjava.vscode-java-pack",
45-
"ms-vscode.test-adapter-converter",
46-
"shengchen.vscode-checkstyle",
47-
"mechatroner.rainbow-csv",
48-
"redhat.vscode-xml",
49-
"eamodio.gitlens"
50-
]
51-
52-
53-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
54-
// "forwardPorts": [],
55-
56-
// Use 'postCreateCommand' to run commands after the container is created.
57-
//"postCreateCommand": "mvn package",
58-
59-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
60-
//"remoteUser": "vscode",
61-
//"features": {
62-
// "github-cli": "latest"
63-
//}
64-
}
65-
19+
"customizations": {
20+
"vscode": {
21+
// Add the IDs of extensions you want installed when the container is created.
22+
"extensions": [
23+
"vscjava.vscode-java-pack",
24+
"ms-vscode.test-adapter-converter",
25+
"shengchen.vscode-checkstyle",
26+
"mechatroner.rainbow-csv",
27+
"redhat.vscode-xml",
28+
"eamodio.gitlens"
29+
],
30+
"settings": {
31+
"java.configuration.updateBuildConfiguration": "interactive",
32+
"[java]": {
33+
"editor.defaultFormatter": "redhat.java",
34+
"editor.formatOnSave": true,
35+
"editor.tabSize": 2,
36+
"editor.insertSpaces": true,
37+
"editor.detectIndentation": false
38+
},
39+
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
40+
"java.saveActions.organizeImports": true,
41+
"java.checkstyle.version": "10.15.0",
42+
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
43+
"[xml]": {
44+
"editor.tabSize": 4,
45+
"editor.insertSpaces": false
46+
},
47+
"[json]": {
48+
"editor.tabSize": 4,
49+
"editor.insertSpaces": true
50+
}
51+
}
52+
}
53+
}
54+
}

.vscode/settings.json

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
{
2-
"java.configuration.updateBuildConfiguration": "interactive",
3-
"[java]": {
4-
"editor.defaultFormatter": "redhat.java",
5-
"editor.formatOnSave": true,
6-
},
7-
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
8-
"java.saveActions.organizeImports": true,
2+
"java.configuration.updateBuildConfiguration": "interactive",
3+
"[java]": {
4+
"editor.defaultFormatter": "redhat.java",
5+
"editor.formatOnSave": true,
96
"editor.tabSize": 2,
107
"editor.insertSpaces": true,
11-
"editor.detectIndentation": false,
12-
"java.checkstyle.version": "10.9.3",
13-
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
14-
"java.debug.settings.hotCodeReplace": "never"
15-
}
8+
"editor.detectIndentation": false
9+
},
10+
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
11+
"java.saveActions.organizeImports": true,
12+
"java.checkstyle.version": "10.15.0",
13+
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
14+
"java.debug.settings.hotCodeReplace": "never",
15+
"[xml]": {
16+
"editor.tabSize": 4,
17+
"editor.insertSpaces": false
18+
},
19+
"[json]": {
20+
"editor.tabSize": 4,
21+
"editor.insertSpaces": true
22+
}
23+
}

checkstyle_neqsim.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@
248248
<module name="CustomImportOrder">
249249
<property name="sortImportsInGroupAlphabetically" value="true" />
250250
<property name="separateLineBetweenGroups" value="true" />
251-
<property name="specialImportsRegExp" value="neqsim*"/>
252-
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE" />
251+
<property name="specialImportsRegExp" value="neqsim.*"/>
252+
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE" />
253253
<property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF" />
254254
</module>
255255
<module name="MethodParamPad">

0 commit comments

Comments
 (0)