mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add optionals to validation tools (#8290)
This commit is contained in:
parent
59e3b07c36
commit
2513ef25de
@ -1,3 +1,4 @@
|
|||||||
|
//IGNORE_STRING_WARNING(str_ace_tracers_magazine);
|
||||||
#define STRINGS(magazine) author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine)
|
#define STRINGS(magazine) author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine)
|
||||||
|
|
||||||
class CfgMagazines {
|
class CfgMagazines {
|
||||||
|
@ -17,7 +17,7 @@ def getDefinedStrings(filepath):
|
|||||||
return modStrings
|
return modStrings
|
||||||
|
|
||||||
def getStringUsage(filepath):
|
def getStringUsage(filepath):
|
||||||
selfmodule = (re.search('addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
|
selfmodule = (re.search('(addons|optionals)[\W]*([_a-zA-Z0-9]*)', filepath)).group(2)
|
||||||
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
||||||
fileStrings = []
|
fileStrings = []
|
||||||
|
|
||||||
@ -51,10 +51,11 @@ def main(argv):
|
|||||||
allDefinedStrings = []
|
allDefinedStrings = []
|
||||||
allUsedStrings = []
|
allUsedStrings = []
|
||||||
|
|
||||||
|
for folder in ['addons', 'optionals']:
|
||||||
# Allow running from root directory as well as from inside the tools directory
|
# Allow running from root directory as well as from inside the tools directory
|
||||||
rootDir = "../addons"
|
rootDir = "../" + folder
|
||||||
if (os.path.exists("addons")):
|
if (os.path.exists(folder)):
|
||||||
rootDir = "addons"
|
rootDir = folder
|
||||||
|
|
||||||
for root, dirnames, filenames in os.walk(rootDir):
|
for root, dirnames, filenames in os.walk(rootDir):
|
||||||
for filename in fnmatch.filter(filenames, '*.sqf'):
|
for filename in fnmatch.filter(filenames, '*.sqf'):
|
||||||
|
@ -131,10 +131,11 @@ def main():
|
|||||||
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
|
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
for folder in ['addons', 'optionals']:
|
||||||
# Allow running from root directory as well as from inside the tools directory
|
# Allow running from root directory as well as from inside the tools directory
|
||||||
rootDir = "../addons"
|
rootDir = "../" + folder
|
||||||
if (os.path.exists("addons")):
|
if (os.path.exists(folder)):
|
||||||
rootDir = "addons"
|
rootDir = folder
|
||||||
|
|
||||||
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
|
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
|
||||||
for filename in fnmatch.filter(filenames, '*.cpp'):
|
for filename in fnmatch.filter(filenames, '*.cpp'):
|
||||||
|
@ -165,10 +165,11 @@ def main():
|
|||||||
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
|
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
for folder in ['addons', 'optionals']:
|
||||||
# Allow running from root directory as well as from inside the tools directory
|
# Allow running from root directory as well as from inside the tools directory
|
||||||
rootDir = "../addons"
|
rootDir = "../" + folder
|
||||||
if (os.path.exists("addons")):
|
if (os.path.exists(folder)):
|
||||||
rootDir = "addons"
|
rootDir = folder
|
||||||
|
|
||||||
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
|
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
|
||||||
for filename in fnmatch.filter(filenames, '*.sqf'):
|
for filename in fnmatch.filter(filenames, '*.sqf'):
|
||||||
|
Loading…
Reference in New Issue
Block a user