You can set up Clang to be used in the command line or through a Visual Studio Extension.
-
Install Clang-Format from here
-
Then when you install make sure to allow a new PATH to be created for Clang
-
To run clang-format open the terminal and use the following command in the project folder:
$ clang-format -style=file LennahSSG/*.cpp LennahSSG/*.h
-
Install Clang by following the instructions here.
-
Turn on "Format on save" in the settings.
-
You can also format by clicking the format button(Alt+M) in Visual Studio:
You can set up Clang to be used in the command line or through a Visual Studio Extension.
- Clang-Tidy is included in the same package as Clang-Format. Follow the same instructions as Clang-Format if not already done.
- To run clang-tidy open the terminal and use the following command in the project folder:
$ clang-tidy --config="" LennahSSG/*.cpp LennahSSG/*.h --extra-arg=-std=c++17 --extra-arg=-xc++ --
This will display the lint that needs fixing in errors.
-
Follow the same installation as for the extension for Clang-Format if not already done.
-
Turn on "Format after Tidy" and "Tidy on save"
-
You can Lint the current file by clicking the Tidy button(Alt+Y) in Visual Studio:
-
Then you can view the lint that needs fixing in the warnings area below.
-
You can also make a quick fix by pressing the drop down beside the Tidy button or pressing Alt+X
To run the testing checks for the application it is really simple, just run the application like normally but add --test
or -t
as an argument when running. Then it will run the Unit Testing feature of LENNAH making checks with each function and end with a E2E test.
$ C:\Users\User\LennahSSG\Debug\LennahSSG.exe --test