Forums / Code Collaboration / IDE code inspections: script for indexing database and .lang constants

IDE code inspections: script for indexing database and .lang constants

Views: 4,834

Results 1 to 2 of 2
5 Jun 2022, 9:21 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

IDE code inspections: script for indexing database and .lang constants

Your IDE may not index (find) the constants stored in the database, nor those in the .lang language file arrays (introduced from Zen Cart 158), so code inspections may flag these constants as "undefined".

This script generates two local php files containing generated defines from

a) the configuration_keys/constants in the database
b) the language constants from the arrays in .lang language files

Hopefully your IDE will index these and clear the false "undefined" errors.

https://github.com/torvista/Zen_Cart-List_Constants_For_IDE

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

25 Aug 2023, 2:02 PM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: IDE code inspections: script for indexing database and .lang constants

Developers, note this is updated for ZC158+.
https://github.com/torvista/Zen_Cart-List_Constants_For_IDE

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...