Combat Items: SonarCloud Sprint 3 - UQdeco2800/2022-studio-2 GitHub Wiki

Sonar Cloud Errors

For sprint 3, we had significantly less errors and bugs in the code we added to the game compared to previous sprints. In Sonar cloud although we had 3 bugs and multiple code smells they were all relatively easy fixes. There were various code errors which appeared in sonar cloud which were fixed after the code had been pushed to main, therefore some errors which appeared in sonar cloud had already been resolved.

Solutions Fixed

Minor Issues

Some of the minor issues in the game which were fixed included:

  • Removed unused variables
  • Removed old comments

Major Issues

A major code smells issue which has been resolved is the lack of constructors in our Weapon and Aura Factory classes. In this sprint I added an empty constructor to these classes to resolve this.


The major bugs in the code were mainly to do with duplicate naming of methods in child and parent classes. This was resolved by refactoring the names of these methods to ensure that there is no confusion in the code. Classes which encountered this issue included:

  • AuraPickupComponent
  • PhysicalWeaponStatsComponent
  • RangedStatsComponent

The message in Sonar Cloud appeared as such in the example below:

To Be Reviewed

In the final polish for the game, we will need to review the more minor errors in the game and clean any comments that we wanted to remain or edit upon in the final sprint.

Testing & Debugging

  • For this sprint we were able to completely test the attack functionality now that the equipped weapon functionality has been incorporated. This helped debug the function and reduce error.

  • Additionally we ran a test on one of our animations to check that the animation is registering properly.

  • To support testing and keep a record of our functional code, we have added logging to our attack and drop weapon implementations to ensure proper recording and logging.

Back to Combat Items Contents Page

Author:

  • Madi Feddema
  • GitHub: @madifeddema
  • Discord: madi-feddema#3384
  • Slack: Madi Feddema