From f7bc77d978bf700abc6d80fdb2da8f20b935e950 Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:13:45 +0100 Subject: [PATCH] Add initial IDE setup (#1326) --- cpp/.clang-format | 12 -- cpp/.gitignore | 3 - cpp/.vscode/launch.json | 53 -------- cpp/.vscode/tasks.json | 19 --- cpp/launch_sudo.sh | 3 - ide_setup/README | 5 + ide_setup/eclipse_code_formatter.xml | 193 +++++++++++++++++++++++++++ 7 files changed, 198 insertions(+), 90 deletions(-) delete mode 100644 cpp/.clang-format delete mode 100644 cpp/.vscode/launch.json delete mode 100644 cpp/.vscode/tasks.json delete mode 100755 cpp/launch_sudo.sh create mode 100644 ide_setup/README create mode 100644 ide_setup/eclipse_code_formatter.xml diff --git a/cpp/.clang-format b/cpp/.clang-format deleted file mode 100644 index 7e73f97c..00000000 --- a/cpp/.clang-format +++ /dev/null @@ -1,12 +0,0 @@ -BasedOnStyle: Microsoft -IndentWidth: 4 -AlwaysBreakAfterReturnType: None -AllowShortFunctionsOnASingleLine: Empty -KeepEmptyLinesAtTheStartOfBlocks: false -BreakBeforeBraces: Linux -AlignEscapedNewlines: Left -AlignTrailingComments: True -AllowShortEnumsOnASingleLine: True -AlignConsecutiveAssignments: Consecutive -ColumnLimit: 120 -PointerAlignment: Left \ No newline at end of file diff --git a/cpp/.gitignore b/cpp/.gitignore index 4efdbaa3..6f970d2d 100644 --- a/cpp/.gitignore +++ b/cpp/.gitignore @@ -12,6 +12,3 @@ obj bin coverage generated -.project -.cproject -.settings diff --git a/cpp/.vscode/launch.json b/cpp/.vscode/launch.json deleted file mode 100644 index f3a2f763..00000000 --- a/cpp/.vscode/launch.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "rascsi (gdb) Launch", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/bin/fullspec/rascsi", - "args": [], - "stopAtEntry": true, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "targetArchitecture": "arm", - "miDebuggerPath": "${workspaceFolder}/launch_sudo.sh", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - }, - { - "name": "rascsi_test (gdb) Launch", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/bin/fullspec/rascsi_test", - "args": [], - "stopAtEntry": true, - "cwd": "${fileDirname}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - }, - { - "description": "Set Disassembly Flavor to Intel", - "text": "-gdb-set disassembly-flavor intel", - "ignoreFailures": true - } - ] - }, - ] -} \ No newline at end of file diff --git a/cpp/.vscode/tasks.json b/cpp/.vscode/tasks.json deleted file mode 100644 index 6105ee09..00000000 --- a/cpp/.vscode/tasks.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "type": "shell", - "label": "g++ build active file", - "command": "make", - "args": ["all", "DEBUG=1", "-j4"], - "options": { - "cwd": "${workspaceFolder}/" - }, - "problemMatcher": ["$gcc"], - "group": { - "kind": "build", - "isDefault": true - } - } - ] - } diff --git a/cpp/launch_sudo.sh b/cpp/launch_sudo.sh deleted file mode 100755 index 6ce283c1..00000000 --- a/cpp/launch_sudo.sh +++ /dev/null @@ -1,3 +0,0 @@ -# This is used for debugging. VisualStudio code will call this file when launching -# the debugger, instead of directly calling GDB. That way we can add the pkexec -sudo /usr/bin/gdb "$@" \ No newline at end of file diff --git a/ide_setup/README b/ide_setup/README new file mode 100644 index 00000000..3b0d2b6a --- /dev/null +++ b/ide_setup/README @@ -0,0 +1,5 @@ +The Eclipse code formatter configuration shall be used together with +Eclipse CDT in order to unify the formatting of the C++ code. Ensure to keep +your formatting rules up to date. + +This formatter can also be imported into Intellij IDEA. diff --git a/ide_setup/eclipse_code_formatter.xml b/ide_setup/eclipse_code_formatter.xml new file mode 100644 index 00000000..13b13d59 --- /dev/null +++ b/ide_setup/eclipse_code_formatter.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +