Skip to content

Commit

Permalink
fix: update devcontainer.json to new format (#978)
Browse files Browse the repository at this point in the history
* fix: update devcontainer.json to new format
chore: update checkstyle version
style: fix xml and json tab settings
* chore: checkstyle, match default import order
  • Loading branch information
asmfstatoil authored Apr 2, 2024
1 parent 58fc099 commit a3bc78b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 61 deletions.
83 changes: 36 additions & 47 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,40 @@
"NODE_VERSION": "lts/*"
}
},

// Set *default* container specific settings.json values on container create.
//"settings": {
// "java.home": "/docker-java-home"
//},
"settings": {
"java.configuration.updateBuildConfiguration": "interactive",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"java.checkstyle.version": "10.3",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"ms-vscode.test-adapter-converter",
"shengchen.vscode-checkstyle",
"mechatroner.rainbow-csv",
"redhat.vscode-xml",
"eamodio.gitlens"
]


// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
//"postCreateCommand": "mvn package",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
//"remoteUser": "vscode",
//"features": {
// "github-cli": "latest"
//}
}

"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"ms-vscode.test-adapter-converter",
"shengchen.vscode-checkstyle",
"mechatroner.rainbow-csv",
"redhat.vscode-xml",
"eamodio.gitlens"
],
"settings": {
"java.configuration.updateBuildConfiguration": "interactive",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"java.checkstyle.version": "10.15.0",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
"[xml]": {
"editor.tabSize": 4,
"editor.insertSpaces": false
},
"[json]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
}
}
}
}
}
32 changes: 20 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.formatOnSave": true,
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"java.configuration.updateBuildConfiguration": "interactive",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"java.checkstyle.version": "10.9.3",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
"java.debug.settings.hotCodeReplace": "never"
}
"editor.detectIndentation": false
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"java.checkstyle.version": "10.15.0",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
"java.debug.settings.hotCodeReplace": "never",
"[xml]": {
"editor.tabSize": 4,
"editor.insertSpaces": false
},
"[json]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
}
}
4 changes: 2 additions & 2 deletions checkstyle_neqsim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@
<module name="CustomImportOrder">
<property name="sortImportsInGroupAlphabetically" value="true" />
<property name="separateLineBetweenGroups" value="true" />
<property name="specialImportsRegExp" value="neqsim*"/>
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE" />
<property name="specialImportsRegExp" value="neqsim.*"/>
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE" />
<property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF" />
</module>
<module name="MethodParamPad">
Expand Down

0 comments on commit a3bc78b

Please sign in to comment.