Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
ColumnLimit: 100
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BreakBeforeBinaryOperators: NonAssignment
PointerAlignment: Left
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
AlignConsecutiveAssignments: false
AlignTrailingComments: true
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes",
"ms-vscode.cmake-tools",
"sadesyllas.vscode-workspace-switcher",
"editorconfig.editorconfig",
"xaver.clang-format",
Expand Down
24 changes: 0 additions & 24 deletions .vscode/recommended-settings.json

This file was deleted.

19 changes: 18 additions & 1 deletion .vscode/setting.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"[c]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
Expand Down Expand Up @@ -38,5 +41,19 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc-13",
"CMAKE_CXX_COMPILER": "g++-13"
}
},
"clang-format.executable": "/usr/bin/clang-format",
"clang-format.fallbackStyle": "LLVM",
"clang-format.language.cpp.enable": true,
"clang-format.style": "file",
"files.defaultLanguage": "cpp",
"files.hotExit": "onExit",
"yaml.format.enable": true,
"yaml.format.singleQuote": true,
"yaml.format.bracketSpacing": true,
"yaml.format.proseWrap": true,
"yaml.format.printWidth": true,
"yaml.validate": true,
"yaml.hover": true,
"yaml.completion": true
}
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ add_executable(cpp-workspace-app
src/main.cpp
)

# Add find_package() and target_link_libraries() here
# for each dependency installed by Conan.

find_package(fmt CONFIG REQUIRED)
target_link_libraries(cpp-workspace-app PRIVATE fmt::fmt)

Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AppConan(ConanFile):
generators = "CMakeDeps", "CMakeToolchain"

def requirements(self):
self.requires("fmt/11.2.0") # Replace with your dependencies
self.requires("fmt/11.2.0")

def layout(self):
cmake_layout(self)
Empty file removed src/.gitkeep
Empty file.
20 changes: 10 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ using std::cout;
using std::format;

int main() {
const char string[]{"this is a string"};
const char string[]{"this is a string"};

for (auto *p = string; *p; p++) {
cout << format("char = {}\n", *p);
}
for (auto* p = string; *p; p++) {
cout << format("char = {}\n", *p);
}

for (int i{0}; string[i]; i++) {
cout << format("{} char = {}\n", i, string[i]);
}
for (int i{0}; string[i]; i++) {
cout << format("{} char = {}\n", i, string[i]);
}

for (const auto &el : string) {
cout << format("element = {}\n", el);
}
for (const auto& el : string) {
cout << format("element = {}\n", el);
}
}
1 change: 0 additions & 1 deletion tools/shell/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

source tools/shell/utils/config.sh
source tools/shell/utils/colors.sh ''
source tools/shell/utils/print-utils.sh ''

##
Expand Down
Loading