-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: add editor and lint configuration
Add a standardized vscode configuration that should lead to a more consistent code base. Additionally, switch to markdownlint-cli that is well supported in vs code and other editors. The rules are kept the same, but we extend linting to our documentation to. To satisfy the linter, we switch to myst parser for sphinx which allows us to drop the hacky html tags in the markdown files. Myst is as powerful as RST with a more sane syntax.
- Loading branch information
Showing
16 changed files
with
212 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"globs": ["**/*.md"], | ||
"ignores": [ | ||
"**/node_modules/**", | ||
"**/venv/**", | ||
"licenses/data/**", | ||
"**/_build/**" | ||
], | ||
"config": { | ||
"default": true, | ||
"MD013": { | ||
"line_length": 100, | ||
"code_blocks": false, | ||
"tables": false | ||
}, | ||
"MD007": { | ||
"indent": 4 | ||
}, | ||
"MD024": { | ||
"allow_different_nesting": true | ||
}, | ||
"MD030": { | ||
"ol_multi": 1, | ||
"ul_multi": 1, | ||
"ol_single": 1, | ||
"ul_single": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"recommendations": [ | ||
"DavidAnson.vscode-markdownlint", | ||
"eamodio.gitlens", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github", | ||
"golang.go", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.isort", | ||
"ms-python.vscode-pylance", | ||
"ms-vscode-remote.remote-containers", | ||
"ms-vscode-remote.remote-ssh", | ||
"ms-vscode-remote.remote-ssh-edit", | ||
"ms-vscode.remote-explorer", | ||
"ms-vsliveshare.vsliveshare", | ||
"mhutchie.git-graph", | ||
"shardulm94.trailing-spaces", | ||
"stkb.rewrap", | ||
"stackbuild.bazel-stack-vscode", | ||
"wayou.vscode-todo-highlight", | ||
"windmilleng.vscode-go-autotest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
////////////////////// | ||
// Editor | ||
////////////////////// | ||
"rewrap.wrappingColumn": 80, | ||
"breadcrumbs.enabled": true, | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
|
||
////////////////////// | ||
// Go | ||
////////////////////// | ||
"[go]": { | ||
"editor.snippetSuggestions": "none", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
} | ||
}, | ||
"gopls": { | ||
"formatting.local": "github.com/scionproto/scion", | ||
"usePlaceholders": true, // add parameter placeholders when completing a function | ||
"build.directoryFilters": [ | ||
"-bazel-bin", | ||
"-bazel-out", | ||
"-venv", | ||
"-bazel-testlogs" | ||
], | ||
// Experimental settings | ||
"completeUnimported": true, // autocomplete unimported packages | ||
"deepCompletion": true // enable deep completion | ||
}, | ||
|
||
////////////////////// | ||
// Python | ||
////////////////////// | ||
"python.languageServer": "Pylance", | ||
"python.analysis.exclude": [ | ||
"**/.bazel-*/**", | ||
"**/.idea/**", | ||
"**/.git/objects/**", | ||
"**/.git/subtree-cache/**", | ||
"**/.venvs/**", | ||
"**/bazel-*/**" | ||
], | ||
"python.envFile": "${workspaceFolder}/.vscode/.env", | ||
|
||
////////////////////// | ||
// Prettier | ||
////////////////////// | ||
"prettier.documentSelectors": ["**/*.json"], | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
|
||
////////////////////// | ||
// Files, Search | ||
////////////////////// | ||
"files.associations": { | ||
"*.topo": "yaml" | ||
}, | ||
"files.watcherExclude": { | ||
"**/.bazel-*/**": true, | ||
"**/.idea/**": true, | ||
"**/.git/objects/**": true, | ||
"**/.git/subtree-cache/**": true, | ||
"**/.venvs/**": true, | ||
"**/bazel-*/**": true, | ||
"**/gen-cache/**": true, | ||
"gen*/**": true, | ||
"**/logs/**": true, | ||
"**/node_modules/**": true | ||
}, | ||
"search.exclude": { | ||
"**/.bazel-*/**": true, | ||
"**/.idea/**": true, | ||
"**/.git/objects/**": true, | ||
"**/.git/subtree-cache/**": true, | ||
"**/.venvs/**": true, | ||
"**/bazel-*/**": true, | ||
"**/gen-cache/**": true, | ||
"**/logs/**": true, | ||
"**/node_modules/**": true | ||
}, | ||
"search.followSymlinks": false, | ||
|
||
////////////////////// | ||
// Docker | ||
////////////////////// | ||
"docker.containers.sortBy": "Label", | ||
|
||
////////////////////// | ||
// GitHub | ||
////////////////////// | ||
"githubPullRequests.pullBranch": "never" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../.markdownlint-cli2.jsonc", | ||
"config": { | ||
"MD041": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.