|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
| 2 | +// https://github.com/microsoft/vscode-dev-containerdevcotns/tree/v0.238.0/containers/go |
| 3 | +{ |
| 4 | + "name": "prd", |
| 5 | + "build": { |
| 6 | + "dockerfile": "Dockerfile", |
| 7 | + "context": ".." |
| 8 | + }, |
| 9 | + "runArgs": [ |
| 10 | + "--cap-add=SYS_PTRACE", |
| 11 | + "--security-opt", |
| 12 | + "seccomp=unconfined", |
| 13 | + "--platform=linux/amd64" |
| 14 | + ], |
| 15 | + |
| 16 | + "postStartCommand": "git submodule update --init --recursive", |
| 17 | + |
| 18 | + // Configure tool-specific properties. |
| 19 | + "customizations": { |
| 20 | + // Configure properties specific to VS Code. |
| 21 | + "vscode": { |
| 22 | + // Set *default* container specific settings.json values on container create. |
| 23 | + "settings": { |
| 24 | + "files.trimFinalNewlines": true, |
| 25 | + "files.trimTrailingWhitespace": true, |
| 26 | + "files.insertFinalNewline": true, |
| 27 | + |
| 28 | + "[cpp]": { |
| 29 | + "editor.formatOnSave": true |
| 30 | + }, |
| 31 | + |
| 32 | + "[json]": { |
| 33 | + "editor.defaultFormatter": "esbenp.prettier-vscode", |
| 34 | + "editor.formatOnSave": true |
| 35 | + }, |
| 36 | + |
| 37 | + "[jsonc]": { |
| 38 | + "editor.defaultFormatter": "esbenp.prettier-vscode", |
| 39 | + "editor.formatOnSave": true |
| 40 | + }, |
| 41 | + |
| 42 | + "[python]": { |
| 43 | + "editor.defaultFormatter": "ms-python.black-formatter", |
| 44 | + "editor.formatOnSave": true |
| 45 | + }, |
| 46 | + |
| 47 | + "cmake.sourceDirectory": "${workspaceFolder}/cpp", |
| 48 | + "cmake.buildDirectory": "${workspaceFolder}/cpp/build", |
| 49 | + "cmake.configureOnOpen": false, |
| 50 | + |
| 51 | + "python.defaultInterpreterPath": "/opt/conda/envs/prd/bin/python", |
| 52 | + "python.analysis.typeCheckingMode": "strict", |
| 53 | + "python.analysis.diagnosticMode": "workspace", |
| 54 | + "python.analysis.diagnosticSeverityOverrides": { |
| 55 | + "reportUnknownArgumentType": "none", |
| 56 | + "reportUnknownLambdaType": "none", |
| 57 | + "reportUnknownMemberType": "none", |
| 58 | + "reportUnknownParameterType": "none", |
| 59 | + "reportUnknownVariableType": "none", |
| 60 | + "reportUnnecessaryIsInstance": "none", |
| 61 | + "reportUnusedImport": "none" |
| 62 | + }, |
| 63 | + "python.terminal.activateEnvironment": false, // Disable the extension calling activate when the integrated terminal launches. We take care of this in ~/.bashrc. |
| 64 | + |
| 65 | + "testMate.cpp.test.executables": "cpp/{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*", |
| 66 | + |
| 67 | + // enable pretty printing when debugging C++ tests |
| 68 | + "testMate.cpp.debug.configTemplate": { |
| 69 | + "type": "cppvsdbg", |
| 70 | + "linux": { "type": "cppdbg", "MIMode": "gdb" }, |
| 71 | + "darwin": { "type": "cppdbg", "MIMode": "lldb" }, |
| 72 | + "win32": { "type": "cppvsdbg" }, |
| 73 | + "program": "${exec}", |
| 74 | + "args": "${argsArray}", |
| 75 | + "cwd": "${cwd}", |
| 76 | + "env": "${envObj}", |
| 77 | + "environment": "${envObjArray}", |
| 78 | + "sourceFileMap": "${sourceFileMapObj}", |
| 79 | + "setupCommands": [ |
| 80 | + { |
| 81 | + "description": "Enable pretty-printing for gdb", |
| 82 | + "text": "-enable-pretty-printing", |
| 83 | + "ignoreFailures": true |
| 84 | + } |
| 85 | + ], |
| 86 | + |
| 87 | + "gitlens.showWelcomeOnInstall": false, |
| 88 | + "gitlens.showWhatsNewAfterUpgrades": false |
| 89 | + }, |
| 90 | + |
| 91 | + "gcovViewer.gcovBinary": "/opt/conda/envs/prd/bin/x86_64-conda-linux-gnu-gcov", |
| 92 | + "gcovViewer.buildDirectories": ["${workspaceFolder}/cpp/build"], |
| 93 | + |
| 94 | + "search.useIgnoreFiles": false, |
| 95 | + "search.exclude": { |
| 96 | + "**/cpp/build": true |
| 97 | + } |
| 98 | + }, |
| 99 | + |
| 100 | + // Add the IDs of extensions you want installed when the container is created. |
| 101 | + "extensions": [ |
| 102 | + "cschlosser.doxdocgen", |
| 103 | + "eamodio.gitlens", |
| 104 | + "esbenp.prettier-vscode", |
| 105 | + "JacquesLucke.gcov-viewer", |
| 106 | + "matepek.vscode-catch2-test-adapter", |
| 107 | + "mhutchie.git-graph", |
| 108 | + "ms-python.black-formatter", |
| 109 | + "ms-python.python", |
| 110 | + "ms-vscode.cmake-tools", |
| 111 | + "ms-vscode.cpptools", |
| 112 | + "timonwong.shellcheck", |
| 113 | + "twxs.cmake" |
| 114 | + ] |
| 115 | + } |
| 116 | + }, |
| 117 | + |
| 118 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 119 | + // "forwardPorts": [], |
| 120 | + |
| 121 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 122 | + // "postCreateCommand": "go version", |
| 123 | + |
| 124 | + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 125 | + "remoteUser": "vscode" |
| 126 | +} |
0 commit comments