InventoryComponent: : SonarCloud Sprint 4 - UQdeco2800/2022-studio-2 GitHub Wiki

Introduction

Throughout the whole development process, InventoryComponent's code smells have always been kept below 10. In the final sprint, the code is polished and all the code smells are removed to ensure the game runs smoothly. Furthermore, to improve the quality of the code. An analysis of code smells and test coverage is in the below table.

Since SonarCloud is an automated tool to check on code quality and design, some implementations will be flagged as smell by accident. The cases where it was not appropriate to change will be explained in detail down below.

Sprint 4

Class Minor smells Major smells Critical Code Coverage
InventoryComponent 0 0 0 100%
GameAreaDisplay 1 0 0 Visually tested
QuickBarDisplay 1 0 0 Visually tested

The functions used for displaying inventory are defined in GameAreaDisplay and QuickBarDisplay. The minor code smells are caused by the integer division operand in the position calculation. The first operand is intended to be an integer, hence this minor code smell should be ignored.

Code Coverage

All of the inventory methods are fully covered by Junit tests. Weapon animations and their rendering are tested visually by team 2 and team 4.

Future plan

In the future developing stages, the general code design will prioritise readability, and code smells will remain strictly monitored.

Back to Inventory Page

Author

  • Li-Sung Ou
  • GitHub: @PeterOu8
  • Discord: Secret Agent Randy Beans#6754
  • Slack: Li-Sung Ou
⚠️ **GitHub.com Fallback** ⚠️