From ea396f9e6ae1340685ad4028bb1b6409df68864a Mon Sep 17 00:00:00 2001 From: Florian Nouviale Date: Tue, 12 Jan 2021 16:41:50 +0100 Subject: [PATCH 1/2] Fixing message name that should not take a capital first letter automatically --- Runtime/MessageGeneration/MessageParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/MessageGeneration/MessageParser.cs b/Runtime/MessageGeneration/MessageParser.cs index 4219d84b..d468cb5a 100644 --- a/Runtime/MessageGeneration/MessageParser.cs +++ b/Runtime/MessageGeneration/MessageParser.cs @@ -72,7 +72,7 @@ public MessageParser(List tokens, string outPath, string rosPackag if (rosMsgName.Equals("")) { - this.rosMsgName = MsgAutoGenUtilities.CapitalizeFirstLetter(inFileName); + this.rosMsgName = inFileName; } else { From f48ceec2825047f292028100e35fa8e5489e32c8 Mon Sep 17 00:00:00 2001 From: Florian Nouviale Date: Mon, 25 Jan 2021 12:18:51 +0100 Subject: [PATCH 2/2] Adding warning when a message file name starts with a lowercase character --- Runtime/MessageGeneration/MessageParser.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/MessageGeneration/MessageParser.cs b/Runtime/MessageGeneration/MessageParser.cs index d468cb5a..bdf80cee 100644 --- a/Runtime/MessageGeneration/MessageParser.cs +++ b/Runtime/MessageGeneration/MessageParser.cs @@ -72,6 +72,8 @@ public MessageParser(List tokens, string outPath, string rosPackag if (rosMsgName.Equals("")) { + if (Char.IsLower(inFileName[0])) + Debug.LogWarningFormat("File {0} starts with a lowercase character. Message file names should be CamelCased (see : http://wiki.ros.org/ROS/Patterns/Conventions#line-38)", inFileName); this.rosMsgName = inFileName; } else