DM-1189 clang-tidy part 2
Created by: SkyToGround
Description of work
This is PR number 2 of X (where X >= 4). Due to the number of issues found by clang-tidy, I have had to split this into several PR:s. All PRs in this series will have the same description regardless of the changes.
Note that there are several \todo
comments added during the merge process. These will all be gone by the last PR.
What I have done
- Applied clang-tidy to the filewriter code base.
- Fixed many (but not all) of the issues found by clang-tidy.
- Re-named some variables, functions and class names to better follow the LLVM standard.
- Added A LOT of
const
specifiers. - Clang-tidy is pretty good about finding dead code. I have thus also cleaned out a few hundred lines of dead, useless or redundant code.
- Some refactoring due to issues that popped up when removing dead code (unused arguments).
What I have not done
- I have tried to minimize the number of changes to the Kafka-code (in the KafkaW directory) as that code will probably be replaced soon.
- I have tried to minimize the number of changes to the logging code as that code will probably be replaced soon.
- There are relatively few name changes (to follow the LLVM standard) as there are enough code changes to this project as it is already.
- Functions containing calls to the cli11 and JSON (for Modern C++) libraries were not analysed as clang-tidy crashes on those.
- Due to me getting tired of doing this, the unit test code has a relatively large number of unfixed minor issues remaining.
Issue
- Part in closing DM-1189
- Part in closing DM-1014
Acceptance Criteria
Make sure that the changes are sensible and that they result in no change in functionality.
Unit Tests
No unit tests were changed though a few calls were modified to compile.
Other
N/A
Code Review (To be filled in by the reviewer only)
-
Is the code of an acceptable quality? -
Do the changes function as described and is it robust?
Nominate for Group Code Review (Anyone can nominate it)
Indicate if you think the code should be reviewed in a Thursday code review session.
-
Recommend for group code review
Also, nominate it on the code_review Slack channel (does someone want to automate this?).