Skip to content

Conversation

@tobiasehlert
Copy link
Member

This pull request improves the handling of creature names in the killer parsing logic and adds a new comprehensive test case to verify death data parsing for a specific character. The main changes focus on increasing the robustness of string matching for special creatures and expanding test coverage for death parsing scenarios.

Parsing improvements:

  • The containsCreaturesWithOf function now converts input strings to lowercase before matching, making creature name detection case-insensitive and more reliable.

Test coverage enhancements:

  • Added a new test TestNumber18 in src/TibiaCharactersCharacter_test.go that verifies the parsing of death data for the character "Tirador Azteca," including detailed checks for killer names, death reasons, levels, and timestamps.

fix #504

@tobiasehlert tobiasehlert self-assigned this Sep 15, 2025
@tobiasehlert tobiasehlert added the go Pull requests that update Go code label Sep 15, 2025
@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes character death entry parsing for creature names that contain the preposition "of" by making the creature detection case-insensitive. It also adds comprehensive test coverage for a specific character's death data parsing.

  • Improved case-insensitive creature name detection in killer parsing logic
  • Added comprehensive test coverage for character death data parsing with "Tirador Azteca" test case

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/TibiaCharactersCharacter.go Modified containsCreaturesWithOf function to convert input to lowercase before matching
src/TibiaCharactersCharacter_test.go Added TestNumber18 with detailed death data validation for "Tirador Azteca" character

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.30%. Comparing base (53973d0) to head (a1b1ec2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #505   +/-   ##
=======================================
  Coverage   80.30%   80.30%           
=======================================
  Files          22       22           
  Lines        3697     3697           
=======================================
  Hits         2969     2969           
  Misses        587      587           
  Partials      141      141           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tobiasehlert tobiasehlert merged commit b882465 into main Sep 15, 2025
7 checks passed
@tobiasehlert tobiasehlert deleted the fix-character-death-entry-with-lowercased-of-creature branch September 15, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

bug: character death issues when creature in with-of list

2 participants