[Lazarus] how to check if the same identifier appear in more than 1 unit of the project?

Dennis dec12 at avidsoft.com.hk
Wed Apr 20 19:12:54 CEST 2016



Michael Van Canneyt wrote:
>
>
> On Wed, 20 Apr 2016, Graeme Geldenhuys wrote:
>
>> On 2016-04-20 08:32, Dennis wrote:
>>> Is there any tool to find out ?
>>
>> Multiple options:
>>
>> * Do a "Find in Files" search.
>>
>> * In Lazarus, place the edit cursor inside the identifier. Right Click
>>  and select "Find declaration of <xyz>". Do that in a few units where
>>  the identifier is used, and see if the same declaration is shown.
>
> IMHO you can better use the code browser for this.
>
> Set scope to Project,  'with required packages' scans recursively.
>
> after Show Identifiers type the identifier.
>
> It just misses 'whole words only'...
>
> I find it easier than the find in files:
> Till project groups finally work and find in files is extended to use
> 'project group' scope, the code browser seems the best tool.
>
> Michael.
>
>
Thanks for all of your advice but I have many identifiers in a dozen of 
units.
I am hoping for a tool that do the checking automatically and show me a 
list of conflicts.

Dennis




More information about the Lazarus mailing list