This commit is contained in:
Mylloon 2023-06-01 10:12:02 +02:00
parent 0b1f44a305
commit af7752037f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -26,7 +26,34 @@ def analyze_args(args: list) -> list[str]:
def check_ext(filename: str) -> bool:
"""Vérifie qu'un fichier est supporté en se basant sur son extension"""
supported_exts = ".c"
supported_exts = tuple(
map(
lambda ext: "." + ext,
[
"cs",
"java",
"mjs",
"js",
"ts",
"json",
"m",
"mm",
"proto",
"protodevel",
"td",
"textpb",
"pb.txt",
"textproto",
"asciipb",
"sv",
"svh",
"v",
"vh",
"c",
"cpp",
],
)
)
return filename.endswith(supported_exts)