Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 2.71 KB

CONTRIBUTING.md

File metadata and controls

57 lines (42 loc) · 2.71 KB

LENNAH SSG Contributing Guide

Environment Setup

Clang-Format

You can set up Clang to be used in the command line or through a Visual Studio Extension.

Command Line:

  1. Install Clang-Format from here

    image

  2. Then when you install make sure to allow a new PATH to be created for Clang

    image

  3. To run clang-format open the terminal and use the following command in the project folder:

$ clang-format -style=file LennahSSG/*.cpp LennahSSG/*.h

Extension:

  1. Install Clang by following the instructions here.

  2. Turn on "Format on save" in the settings.

    image Now files should automatically format upon saving.

  3. You can also format by clicking the format button(Alt+M) in Visual Studio:

    image

Clang-Tidy

You can set up Clang to be used in the command line or through a Visual Studio Extension.

Command Line:

  1. Clang-Tidy is included in the same package as Clang-Format. Follow the same instructions as Clang-Format if not already done.
  2. 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.

Extension:

  1. Follow the same installation as for the extension for Clang-Format if not already done.

  2. Turn on "Format after Tidy" and "Tidy on save"

    image

  3. You can Lint the current file by clicking the Tidy button(Alt+Y) in Visual Studio:

    image

  4. Then you can view the lint that needs fixing in the warnings area below.

  5. You can also make a quick fix by pressing the drop down beside the Tidy button or pressing Alt+X

Testing

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