KGergo88 / RDB_Monitor

A generic measurement display program originally developed for the RDB Diplomaterv project
GNU General Public License v3.0
2 stars 1 forks source link

Add a GitHub Actions job for running the CppClean #45

Closed KGergo88 closed 3 years ago

KGergo88 commented 3 years ago

Description

The CI jobs could be extended with the CppClean static code check tool. Link to CppClean: https://github.com/myint/cppclean

Todo

KGergo88 commented 3 years ago

The CppClean checks are relevant for the project as it detected a large number of includes that were either not necessary or could be replaced by forward declarations. There are howewer some findings that can not be solved in the current state of the project. These are related to the Diagram class and the template types used by it. Because of this this check can not be made required but shall be kept so we can detect new issues.

The findings are:

$ cppclean . --include-path tests
./application/sources/diagram.hpp:29: 'ordered_dict.h' does not need to be #included
./application/sources/diagram.hpp:30: 'data_line.hpp' does not need to be #included
./application/sources/diagram_container.hpp:35: 'diagram.hpp' does not need to be #included
./application/sources/i_backend_signal.hpp:32: 'diagram.hpp' does not need to be #included
./application/sources/i_protocol.hpp:29: 'diagram.hpp' does not need to be #included
./application/sources/main_window.hpp:38: 'diagram.hpp' does not need to be #included
./application/sources/measurement_data_protocol.hpp:40: 'diagram.hpp' does not need to be #included
./application/sources/network_handler.hpp:33: 'diagram.hpp' does not need to be #included

The PR of this issue will be merged. This contains the CppClean CI job and a number of refactorings.