diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 68ada9e..b126cbf 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -3,12 +3,8 @@ name: C/C++ CI on: push: branches: [ master ] - pull_request_target: - types: - - opened - - edited - - synchronize - - reopened + pull_request: + branches: [ master ] jobs: linter: @@ -34,11 +30,6 @@ jobs: - name: make run: make - if: ${{ github.event_name == 'push' }} - - - name: make (with test coverage) - run: make gcov - if: ${{ github.event_name == 'pull_request_target' }} - name: make - copy test into testing folder run: make init_test @@ -46,19 +37,5 @@ jobs: - name: make - test run: make test - - name: make - init code coverage - run: | - sudo apt-get install -y lcov && make lcov - if: ${{ github.event_name == 'pull_request_target' }} - - - name: upload code coverage report - uses: zgosalvez/github-actions-report-lcov@v1 - with: - coverage-files: coverage.info - minimum-coverage: 80 - artifact-name: code-coverage-report - github-token: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'pull_request_target' }} - - name: cleaning afterworks run: make clean diff --git a/src/Grade.cpp b/src/Grade.cpp index 95fa328..b6915dd 100644 --- a/src/Grade.cpp +++ b/src/Grade.cpp @@ -9,6 +9,7 @@ /** * Default constructor * + * @return void */ Grade::Grade() { _grade = 0.0; } @@ -29,6 +30,7 @@ Grade::Grade(const Grade &other) { _grade = other._grade; } /** * Destructor * + * @return void */ Grade::~Grade() { // Do nothing. diff --git a/src/Grade.h b/src/Grade.h index fe320de..5974ccb 100644 --- a/src/Grade.h +++ b/src/Grade.h @@ -28,6 +28,7 @@ class Grade { /** * Default constructor * + * @return void */ Grade(); @@ -48,6 +49,7 @@ class Grade { /** * Destructor * + * @return void */ ~Grade(); diff --git a/src/InputHelper.cpp b/src/InputHelper.cpp index a172702..ceae1b5 100644 --- a/src/InputHelper.cpp +++ b/src/InputHelper.cpp @@ -6,10 +6,20 @@ #include "InputHelper.h" +/** + * InputHelper default constructor + * + * @return void + */ InputHelper::InputHelper() { // Do nothing } +/** + * InputHelper destructor + * + * @return void + */ InputHelper::~InputHelper() { // Do nothing } diff --git a/src/InputHelper.h b/src/InputHelper.h index 20bf214..9eb5e6c 100644 --- a/src/InputHelper.h +++ b/src/InputHelper.h @@ -24,16 +24,26 @@ enum { ALLOW_PARSING_ERROR = 1 << 0, IGNORE_PARSING_ERROR = 1 << 1 }; } /** - * InputHelper + * InputHelper class * */ class InputHelper { private: int _inputFlag = 0; + /** + * InputHelper default constructor + * + * @return void + */ InputHelper(); public: + /** + * InputHelper destructor + * + * @return void + */ ~InputHelper(); /** diff --git a/src/OutputHelper.cpp b/src/OutputHelper.cpp index 0c3b074..f7a900d 100644 --- a/src/OutputHelper.cpp +++ b/src/OutputHelper.cpp @@ -6,10 +6,20 @@ #include "OutputHelper.h" +/** + * OutputHelper default constructor + * + * @return void + */ OutputHelper::OutputHelper() { // Do nothing } +/** + * OutputHelper destructor + * + * @return void + */ OutputHelper::~OutputHelper() { // Do nothing } @@ -53,6 +63,7 @@ void OutputHelper::setOutputFlag(int flag) { _outputFlag |= flag; } /** * Print the textart * + * @return void */ void OutputHelper::printTextart() { std::ifstream textartFile(OutputConstants::TEXTART_FILE); @@ -70,6 +81,7 @@ void OutputHelper::printTextart() { /** * Print a separator line. * + * @return void */ void OutputHelper::printSeparator() { std::cout << std::setfill('-'); @@ -129,8 +141,8 @@ void OutputHelper::printTable( /** * Output in table format - * (without last conclusion row) * + * (without last conclusion row) */ if (!isCSVOutput()) { printTableFormat(tableData); diff --git a/src/OutputHelper.h b/src/OutputHelper.h index d6d3e07..5b33ada 100644 --- a/src/OutputHelper.h +++ b/src/OutputHelper.h @@ -36,16 +36,26 @@ enum { }; } // namespace OutputConstants +/** + * OutputHelper class + * + */ class OutputHelper { private: int _outputFlag = 0; + /** + * OutputHelper default constructor + * + * @return void + */ OutputHelper(); private: /** * Print a separator line. * + * @return void */ void printSeparator(); @@ -78,6 +88,11 @@ class OutputHelper { void printTableFormat(const std::vector> &); public: + /** + * OutputHelper destructor + * + * @return void + */ ~OutputHelper(); /** @@ -112,6 +127,7 @@ class OutputHelper { /** * Print the textart * + * @return void */ void printTextart(); diff --git a/src/PersonalExcept.cpp b/src/PersonalExcept.cpp index 626beff..1e47712 100644 --- a/src/PersonalExcept.cpp +++ b/src/PersonalExcept.cpp @@ -6,10 +6,20 @@ #include "PersonalExcept.h" +/** + * PersonalExcept default constructor + * + * @return void + */ PersonalExcept::PersonalExcept() { // Do nothing. } +/** + * PersonalExcept destructor + * + * @return void + */ PersonalExcept::~PersonalExcept() { // Do nothing. } diff --git a/src/PersonalExcept.h b/src/PersonalExcept.h index b794355..d3b3ed7 100644 --- a/src/PersonalExcept.h +++ b/src/PersonalExcept.h @@ -23,8 +23,18 @@ class PersonalExcept : public PersonalGPA { std::multiset _ignoredCourses; public: + /** + * PersonalExcept default constructor + * + * @return void + */ PersonalExcept(); + /** + * PersonalExcept destructor + * + * @return void + */ ~PersonalExcept(); /** diff --git a/src/PersonalFactory.cpp b/src/PersonalFactory.cpp index dce14cc..b501fcb 100644 --- a/src/PersonalFactory.cpp +++ b/src/PersonalFactory.cpp @@ -6,6 +6,12 @@ #include "PersonalFactory.h" +/** + * PersonalFactory default constructor + * This will push prototypes (classes) to a list - to create later. + * + * @return void + */ PersonalFactory::PersonalFactory() { // Push list of prototypes. _prototypes.push_back(std::make_shared()); @@ -14,8 +20,9 @@ PersonalFactory::PersonalFactory() { } /** - * Destructor + * PersonalFactory destructor * + * @return void */ PersonalFactory::~PersonalFactory() { // Do nothing. diff --git a/src/PersonalFactory.h b/src/PersonalFactory.h index c0804e1..f903b7a 100644 --- a/src/PersonalFactory.h +++ b/src/PersonalFactory.h @@ -19,13 +19,18 @@ class PersonalFactory { // List of prototypes. std::vector> _prototypes; - // Setting up. + /** + * PersonalFactory default constructor + * + * @return void + */ PersonalFactory(); public: /** - * Destructor + * PersonalFactory destructor * + * @return void */ ~PersonalFactory(); diff --git a/src/PersonalGPA.cpp b/src/PersonalGPA.cpp index 3647c7c..a896ecf 100644 --- a/src/PersonalGPA.cpp +++ b/src/PersonalGPA.cpp @@ -7,16 +7,18 @@ #include "PersonalGPA.h" /** - * Constructor for PersonalGPA + * PersonalGPA default constructor * + * @return void */ PersonalGPA::PersonalGPA() { // Do nothing; } /** - * Destructor for PersonalGPA + * PersonalGPA destructor * + * @return void */ PersonalGPA::~PersonalGPA() { // Do nothing; diff --git a/src/PersonalGPA.h b/src/PersonalGPA.h index 2cccc54..4ae552e 100644 --- a/src/PersonalGPA.h +++ b/src/PersonalGPA.h @@ -35,14 +35,16 @@ class PersonalGPA { public: /** - * Constructor for PersonalGPA + * PersonalGPA default constructor * + * @return void */ PersonalGPA(); /** - * Destructor for PersonalGPA + * PersonalGPA destructor * + * @return void */ ~PersonalGPA(); diff --git a/src/PersonalSpecific.cpp b/src/PersonalSpecific.cpp index 21eaa47..4ae48e4 100644 --- a/src/PersonalSpecific.cpp +++ b/src/PersonalSpecific.cpp @@ -6,10 +6,20 @@ #include "PersonalSpecific.h" +/** + * PersonalSpecific default constructor + * + * @return void + */ PersonalSpecific::PersonalSpecific() { // Do nothing } +/** + * PersonalSpecific destructor + * + * @return void + */ PersonalSpecific::~PersonalSpecific() { // Do nothing } diff --git a/src/PersonalSpecific.h b/src/PersonalSpecific.h index 8971d0c..536368d 100644 --- a/src/PersonalSpecific.h +++ b/src/PersonalSpecific.h @@ -20,8 +20,18 @@ */ class PersonalSpecific : public PersonalGPA { public: + /** + * PersonalSpecific default constructor + * + * @return void + */ PersonalSpecific(); + /** + * PersonalSpecific destructor + * + * @return void + */ ~PersonalSpecific(); /** diff --git a/src/Subject.cpp b/src/Subject.cpp index 66c012e..2dc01cd 100644 --- a/src/Subject.cpp +++ b/src/Subject.cpp @@ -6,6 +6,15 @@ #include "Subject.h" +/** + * Subject destructor + * + * @return void + */ +Subject::~Subject() { + // Do nothing +} + /** * Parameterised constructor * @@ -32,14 +41,6 @@ Subject::Subject(const std::string &name, int credit, const Grade &grade) { _grade = grade; } -/** - * Destructor - * - */ -Subject::~Subject() { - // Do nothing -} - /** * Subject name * diff --git a/src/Subject.h b/src/Subject.h index 1d6a6ef..0858a01 100644 --- a/src/Subject.h +++ b/src/Subject.h @@ -40,8 +40,9 @@ class Subject { Subject(const std::string &, int, const Grade &); /** - * Destructor + * Subject destructor * + * @return void */ ~Subject();