Skip to content

Commit 21cf6d5

Browse files
committed
Update README
1 parent 3cc4fb3 commit 21cf6d5

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
**Project Hierarchy**
88
```
9-
includes/ → Header files (.h, .hpp)
10-
src/ → Source files (.cpp)
11-
tests/ → GoogleTest test cases
9+
includes/ -> Header files (.h, .hpp)
10+
src/ -> Source files (.cpp)
11+
tests/ -> GoogleTest test cases
12+
docs/ -> Documents
1213
```
1314

15+
---
1416
## 2. Dependencies
1517
Make sure the following tools are installed before building the project:
1618
- **g++ / gcc**
@@ -20,21 +22,20 @@ Make sure the following tools are installed before building the project:
2022
- **cppcheck** (for static analysis)
2123
- **Optional:** Install `clang-format` to format C++ code.
2224

23-
**Linux**
24-
```bash
25-
sudo apt install clang-format
26-
find . -regex '.*\.\(cpp\|h\|hpp\)' -exec clang-format -i {} \;
27-
```
28-
**Windows**
29-
```bash
30-
# Install clang-format via Chocolatey
31-
choco install clang-format
3225

33-
# Apply clang-format recursively to .cpp, .h, .hpp files
34-
Get-ChildItem -Recurse -Include *.cpp, *.h, *.hpp | ForEach-Object { clang-format -i $_.FullName }
35-
```
36-
## 3. Setup
37-
### 3.1. Setup the Local Test Environment
26+
> Apply clang-format recursively to .cpp, .h, .hpp files
27+
**Linux**
28+
```bash
29+
sudo apt install clang-format
30+
find . -regex '.*\.\(cpp\|h\|hpp\)' -exec clang-format -i {} \;
31+
```
32+
**Windows**
33+
```bash
34+
Get-ChildItem -Recurse -Include *.cpp, *.h, *.hpp | ForEach-Object { clang-format -i $_.FullName }
35+
```
36+
---
37+
## 3. Setup Environment
38+
### 3.1. Dev
3839
- **Ubuntu system**
3940
* Install `gcc`, `cmake`, `git`, and `pthread` (Skip this step if you already install)
4041
```bash
@@ -101,7 +102,7 @@ Get-ChildItem -Recurse -Include *.cpp, *.h, *.hpp | ForEach-Object { clang-forma
101102
* `cpp-lab:latest`: the image you built earlier.
102103
* `/bin/bash`: the command to execute inside the container (opens a Bash shell).
103104

104-
### 3.2 Config C/C++ Debugging (VS Code)
105+
### 3.2 Debug - C/C++ Debugging (VS Code)
105106

106107
#### 3.2.1. Launch Configuration
107108

@@ -235,7 +236,7 @@ Notes:
235236
### 3.3 Documentation with `doxygen`
236237
TBD - Refer to this [Documentation with doxygen](https://www.labri.fr/perso/fleury/posts/programming/using-cmake-googletests-and-gcovr-in-a-c-project.html#:~:text=of%20the%C2%A0project.-,Documentation%20with%20doxygen,-Code%20embedded%20documentation)
237238
238-
## 5. Update Docker Image
239+
## 4. Docker Image
239240
```bash
240241
# Navigate to the project that contain your Dockerfile
241242
cd cpp-lab
@@ -250,11 +251,11 @@ docker image ls
250251
docker push DOCKER_USERNAME/cpp-lab
251252
```
252253
253-
## 6. TroubleShooting
254+
## 5. TroubleShooting
254255
1. `push access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed`
255256
=> docker login / Docker Desktop login
256257
257-
## 7. Evaluate Executable
258+
## 6. Evaluate Executable
258259
- List all sections:
259260
```bash
260261
$ size ./build/cpp-lab

0 commit comments

Comments
 (0)