Merge pull request 'fix(testgen): distinguish between C and C++ based on file extension' (#4) from fix/testgen_for_cpp into master
Reviewed-on: #4
This commit is contained in:
commit
736fe4fcd6
@ -50,6 +50,15 @@ Examples:
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lang := langObj.Name
|
lang := langObj.Name
|
||||||
|
if lang == "C/C++" {
|
||||||
|
ext := strings.ToLower(filepath.Ext(filePath))
|
||||||
|
switch ext {
|
||||||
|
case ".cpp", ".cc", ".cxx":
|
||||||
|
lang = "C++"
|
||||||
|
default:
|
||||||
|
lang = "C"
|
||||||
|
}
|
||||||
|
}
|
||||||
if !supportedLangs[lang] {
|
if !supportedLangs[lang] {
|
||||||
color.Yellow("Unsupported lang '%s' for %s (supported: Go/Python/C/C++)", lang, filePath)
|
color.Yellow("Unsupported lang '%s' for %s (supported: Go/Python/C/C++)", lang, filePath)
|
||||||
allSuccess = false
|
allSuccess = false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user