From 7041d6ce7c37efdfd241b896024ce3dc12eb9fcf Mon Sep 17 00:00:00 2001 From: Narr the Reg <5944268+german77@users.noreply.github.com> Date: Tue, 22 Apr 2025 01:27:31 -0600 Subject: [PATCH] linter: Check for namespaces at start of the line (#563) --- lib/al/Library/Demo/DemoFunction.h | 4 ++-- tools/check-format.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/al/Library/Demo/DemoFunction.h b/lib/al/Library/Demo/DemoFunction.h index b9959fd7..9d9aa14b 100644 --- a/lib/al/Library/Demo/DemoFunction.h +++ b/lib/al/Library/Demo/DemoFunction.h @@ -9,8 +9,8 @@ class DemoActorHolder; class LiveActor; class Scene; -al::AddDemoInfo* registDemoRequesterToAddDemoInfo(const LiveActor* actor, - const ActorInitInfo& initInfo, s32 index); +AddDemoInfo* registDemoRequesterToAddDemoInfo(const LiveActor* actor, const ActorInitInfo& initInfo, + s32 index); void registActorToDemoInfo(LiveActor* actor, const ActorInitInfo& initInfo); void addDemoActorFromAddDemoInfo(const LiveActor* actor, const AddDemoInfo* info); void addDemoActorFromDemoActorHolder(const LiveActor* actor, const DemoActorHolder* holder); diff --git a/tools/check-format.py b/tools/check-format.py index 41eb595e..c8b64cba 100755 --- a/tools/check-format.py +++ b/tools/check-format.py @@ -75,7 +75,7 @@ def common_no_namespace_qualifiers(c, path): del nest_level[-1] continue - matches = re.findall(r"[\(,\s]([^\(,\s]+::)+[^\(,\s]+", x) + matches = re.findall(r"([^\(,\s]+::)+[^\(,\s]+", x) for match in matches: match = match[0:-2] # examples: "sead", "al", "nn::g3d"