summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorManuel Bentele2021-03-04 08:47:43 +0100
committerManuel Bentele2021-03-04 08:47:43 +0100
commit2b5631eaa444023043a18ff3985f5a0e7a11436a (patch)
tree4f27eaf01b80eea60d5f9b65023c8db2635ec8b5 /README.md
parent[BUILD] Add build support for Github actions (diff)
downloaddnbd3-2b5631eaa444023043a18ff3985f5a0e7a11436a.tar.gz
dnbd3-2b5631eaa444023043a18ff3985f5a0e7a11436a.tar.xz
dnbd3-2b5631eaa444023043a18ff3985f5a0e7a11436a.zip
[BUILD] Add support in CMake to validate (lint) the source code
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7260533..d1514fb 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,7 @@ pacman -S git \
make \
cmake \
gcc \
+ clang \
linux-headers \ # or linux-lts-headers
fuse2 \
jansson \
@@ -45,6 +46,7 @@ apt-get install git \
make \
cmake \
gcc \
+ clang-format \
raspberrypi-kernel-headers \
libfuse-dev \
libjansson-dev \
@@ -58,6 +60,7 @@ apt-get install git \
make \
cmake \
gcc \
+ clang-format \
linux-headers-generic \
libfuse-dev \
libjansson-dev \
@@ -72,6 +75,7 @@ apt-get install git \
make \
cmake \
gcc \
+ clang-format \
linux-headers-generic \
libfuse-dev \
libjansson-dev \
@@ -85,6 +89,7 @@ yum install git \
make \
cmake \
gcc \
+ clang-tools-extra \
kernel-devel \
elfutils-libelf-devel \
fuse-devel \
@@ -100,6 +105,7 @@ yum install git \
make \
cmake \
gcc \
+ clang-tools-extra \
kernel-devel \
elfutils-libelf-devel \
fuse-devel \
@@ -116,6 +122,7 @@ Note that `afl` is not available on AlmaLinux 8 and should be built from the [or
pkg install git \
cmake \
gcc \
+ clang-devel \
pkgconf \
fusefs-libs \
jansson \
@@ -318,6 +325,20 @@ More information regarding the Linux kernel's dynamic debug feature can be found
## Development notes
+### Code style of source code files
+The code style fo all source code files can be checked by calling the make target `lint`:
+
+```shell
+make lint
+```
+
+If some source code files do not meet the project's code style, they can be fixed automatically by calling the make target `lint-fix`:
+
+```shell
+make lint-fix
+```
+
+
### Resource locking in dnbd3
The order of aquiring multiple locks is very important, as you'll produce a possible deadlock if you do it in the wrong order. Take very good care of locking order if you have lots of functions that call each other. You might lose track of what's going on.