-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from TomVer99/feature/proper-code-linting
Feature/proper code linting
- Loading branch information
Showing
10 changed files
with
236 additions
and
248 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,3 @@ | ||
--- | ||
BasedOnStyle: Google | ||
... |
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 |
---|---|---|
|
@@ -13,12 +13,11 @@ on: | |
run-name: ${{ inputs.reason || github.event.pull_request.title || github.event.head_commit.message || 'unexpected workflow trigger' }} | ||
|
||
jobs: | ||
linelint: | ||
lint: | ||
runs-on: ubuntu-latest | ||
name: Check for newline at end of file | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Linelint | ||
uses: fernandrone/[email protected] | ||
- name: lint | ||
run: | | ||
find . -name '*.h' -or -name '*.hpp' -or -name '*.cpp' | xargs clang-format --dry-run --Werror |
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 |
---|---|---|
@@ -1,56 +1,52 @@ | ||
//###################################################################### | ||
//# # | ||
//# C++ File # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # C++ File # | ||
// # # | ||
// ###################################################################### | ||
|
||
/** | ||
* @file example.cpp | ||
* | ||
* | ||
* @brief Brief description of the file. | ||
* | ||
* | ||
* @details Detailed description of the file. (optional) | ||
* | ||
* | ||
* @author XXXX | ||
* @date YYYY-MM-DD | ||
*/ | ||
|
||
//###################################################################### | ||
//# # | ||
//# Own Includes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Own Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
#include "example.hpp" | ||
|
||
//###################################################################### | ||
//# # | ||
//# System Includes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # System Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
#include <iostream> | ||
|
||
namespace Example | ||
{ | ||
namespace Example { | ||
|
||
//###################################################################### | ||
//# # | ||
//# Local constants / Defines # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Local constants / Defines # | ||
// # # | ||
// ###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# Functions / Methods # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Functions / Methods # | ||
// # # | ||
// ###################################################################### | ||
|
||
void PrintHelloWorld() | ||
{ | ||
std::cout << "Hello World!" << std::endl; | ||
} | ||
void PrintHelloWorld() { std::cout << "Hello World!" << std::endl; } | ||
|
||
} // namespace Example | ||
} // namespace Example | ||
|
||
//########################### End of File ############################ | ||
// ########################### End of File ############################ |
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 |
---|---|---|
@@ -1,54 +1,53 @@ | ||
//###################################################################### | ||
//# # | ||
//# H++ File # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # H++ File # | ||
// # # | ||
// ###################################################################### | ||
|
||
/** | ||
* @file example.hpp | ||
* | ||
* | ||
* @brief Brief description of the file. | ||
* | ||
* | ||
* @details Detailed description of the file. (optional) | ||
* | ||
* | ||
* @author XXXX | ||
* @date YYYY-MM-DD | ||
*/ | ||
|
||
#ifndef EXAMPLE_HPP | ||
#define EXAMPLE_HPP | ||
|
||
//###################################################################### | ||
//# # | ||
//# Own Includes # | ||
//# # | ||
//###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# System Includes # | ||
//# # | ||
//###################################################################### | ||
|
||
namespace Example | ||
{ | ||
|
||
//###################################################################### | ||
//# # | ||
//# Global constants / Defines # | ||
//# # | ||
//###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# Class / Function prototypes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Own Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
// ###################################################################### | ||
// # # | ||
// # System Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
namespace Example { | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Global constants / Defines # | ||
// # # | ||
// ###################################################################### | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Class / Function prototypes # | ||
// # # | ||
// ###################################################################### | ||
|
||
void PrintHelloWorld(); | ||
|
||
} // namespace Example | ||
} // namespace Example | ||
|
||
#endif //EXAMPLE_HPP | ||
#endif // EXAMPLE_HPP | ||
|
||
//########################### End of File ############################ | ||
// ########################### End of File ############################ |
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 |
---|---|---|
@@ -1,59 +1,58 @@ | ||
//###################################################################### | ||
//# # | ||
//# C++ File # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # C++ File # | ||
// # # | ||
// ###################################################################### | ||
|
||
/** | ||
* @file nestedBottom.cpp | ||
* | ||
* | ||
* @brief Brief description of the file. | ||
* | ||
* | ||
* @details Detailed description of the file. (optional) | ||
* | ||
* | ||
* @author XXXX | ||
* @date YYYY-MM-DD | ||
*/ | ||
|
||
//###################################################################### | ||
//# # | ||
//# Own Includes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Own Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
#include "nestedBottom.hpp" | ||
|
||
#include <nestedTop.hpp> | ||
|
||
//###################################################################### | ||
//# # | ||
//# System Includes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # System Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
#include <iostream> | ||
|
||
namespace Example | ||
{ | ||
|
||
//###################################################################### | ||
//# # | ||
//# Local constants / Defines # | ||
//# # | ||
//###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# Functions / Methods # | ||
//# # | ||
//###################################################################### | ||
|
||
void PrintHelloWorldC() | ||
{ | ||
std::cout << "Calling \"Hello World!B\" from Hello World!C" << std::endl; | ||
PrintHelloWorldB(); | ||
std::cout << "Hello World!C" << std::endl; | ||
namespace Example { | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Local constants / Defines # | ||
// # # | ||
// ###################################################################### | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Functions / Methods # | ||
// # # | ||
// ###################################################################### | ||
|
||
void PrintHelloWorldC() { | ||
std::cout << "Calling \"Hello World!B\" from Hello World!C" << std::endl; | ||
PrintHelloWorldB(); | ||
std::cout << "Hello World!C" << std::endl; | ||
} | ||
|
||
} // namespace Example | ||
} // namespace Example | ||
|
||
//########################### End of File ############################ | ||
// ########################### End of File ############################ |
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 |
---|---|---|
@@ -1,54 +1,53 @@ | ||
//###################################################################### | ||
//# # | ||
//# H++ File # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # H++ File # | ||
// # # | ||
// ###################################################################### | ||
|
||
/** | ||
* @file nestedBottom.hpp | ||
* | ||
* | ||
* @brief Brief description of the file. | ||
* | ||
* | ||
* @details Detailed description of the file. (optional) | ||
* | ||
* | ||
* @author XXXX | ||
* @date YYYY-MM-DD | ||
*/ | ||
|
||
#ifndef NESTED_BOTTOM_HPP | ||
#define NESTED_BOTTOM_HPP | ||
|
||
//###################################################################### | ||
//# # | ||
//# Own Includes # | ||
//# # | ||
//###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# System Includes # | ||
//# # | ||
//###################################################################### | ||
|
||
namespace Example | ||
{ | ||
|
||
//###################################################################### | ||
//# # | ||
//# Global constants / Defines # | ||
//# # | ||
//###################################################################### | ||
|
||
//###################################################################### | ||
//# # | ||
//# Class / Function prototypes # | ||
//# # | ||
//###################################################################### | ||
// ###################################################################### | ||
// # # | ||
// # Own Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
// ###################################################################### | ||
// # # | ||
// # System Includes # | ||
// # # | ||
// ###################################################################### | ||
|
||
namespace Example { | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Global constants / Defines # | ||
// # # | ||
// ###################################################################### | ||
|
||
// ###################################################################### | ||
// # # | ||
// # Class / Function prototypes # | ||
// # # | ||
// ###################################################################### | ||
|
||
void PrintHelloWorldC(); | ||
|
||
} // namespace Example | ||
} // namespace Example | ||
|
||
#endif //NESTED_BOTTOM_HPP | ||
#endif // NESTED_BOTTOM_HPP | ||
|
||
//########################### End of File ############################ | ||
// ########################### End of File ############################ |
Oops, something went wrong.