-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added CONTRIBUTING.md - Added .clang-format and formatted files using clang - Added Clang documentation - Added Linting Documentation and cleaned lint
- Loading branch information
1 parent
e9a05c0
commit 3107d05
Showing
9 changed files
with
102 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format Style Options - Created with Clang Power Tools | ||
--- | ||
BasedOnStyle: Microsoft | ||
ReflowComments: false | ||
SortIncludes: false | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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](https://llvm.org/builds/) | ||
 | ||
1. Then when you install make sure to allow a new PATH to be created for Clang | ||
1. To run clang-format open the terminal and use the following command in the project folder: | ||
```sh | ||
$ clang-format -style=file LennahSSG/*.cpp LennahSSG/*.h | ||
``` | ||
|
||
### Extension: | ||
1. Install Clang by following the instructions [here](https://clangpowertools.com/blog/get-started-with-clang-power-tools.html). | ||
1. Turn on "Format on save" in the settings. | ||
 | ||
Now files should automatically format upon saving. | ||
1. You can also format by clicking the format button(Alt+M) in Visual Studio: | ||
|
||
 | ||
|
||
## 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. | ||
1. To run clang-tidy open the terminal and use the following command in the project folder: | ||
```sh | ||
$ 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. | ||
1. Turn on "Format after Tidy" and "Tidy on save" | ||
 | ||
1. You can Lint the current file by clicking the Tidy button(Alt+Y) in Visual Studio: | ||
|
||
 | ||
1. Then you can view the lint that needs fixing in the warnings area below. | ||
1. You can also make a quick fix by pressing the drop down beside the Tidy button or pressing Alt+X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters