LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI. Just an X-34 landspeeder out for a drive.
https://landsandboat.github.io/server/
GNU General Public License v3.0
277 stars 543 forks source link

Add CI check for missing listener docs #5968

Closed cocosolos closed 1 week ago

cocosolos commented 1 week ago

I affirm:

What does this pull request do?

Adds a job to scan for undocumented listeners so stuff like #5961 is unnecessary.

Steps to test these changes

$ bash tools/ci/cpp.sh src/map/ai/controllers/mob_controller.cpp 2>> cpp_checks.txt
src/map/ai/controllers/mob_controller.cpp:1002: Found undocumented listener. Please document this in AI_Events.txt.
                    PMob->PAI->EventHandler.triggerListener("ROAM_ACTION", CLuaBaseEntity(PMob));

src/map/ai/controllers/mob_controller.cpp:1100: Found undocumented listener. Please document this in AI_Events.txt.
            PMob->PAI->EventHandler.triggerListener("PATH", CLuaBaseEntity(PMob));

src/map/ai/controllers/mob_controller.cpp:1134: Found undocumented listener. Please document this in AI_Events.txt.
        PMob->PAI->EventHandler.triggerListener("WEAPONSKILL_BEFORE_USE", PMob, wsid);
cocosolos commented 1 week ago

This doesn't cover listeners defined and used exclusively in Lua (AERN_RERAISE, JOB_SPECIAL_). I don't think it's necessary to document those as they're defined and used for specific cases.