vsc: run check_grep2 before build (#24538)

* vsc:run check_grep2 before build

* whoops
This commit is contained in:
warriorstar-orion
2024-03-10 18:22:54 +00:00
committed by GitHub
parent b2bc46c810
commit a72e4f7710
2 changed files with 28 additions and 3 deletions
+22 -2
View File
@@ -1,6 +1,24 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": "paracode/linters/check_grep2",
"windows": {
"command": ".\\tools\\bootstrap\\python.bat .\\tools\\ci\\check_grep2.py ${relativeFile}",
},
"problemMatcher": {
"owner": "dm",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*):(\\d+):\\s+(.*)$",
"file": 1,
"line": 2,
"message": 3,
}
},
"label": "linters: run check_grep2"
},
{
"type": "dreammaker",
"dme": "paradise.dme",
@@ -8,7 +26,10 @@
"$dreammaker"
],
"group": "build",
"label": "dm: build - paradise.dme"
"label": "dm: build - paradise.dme",
"dependsOn": [
"linters: run check_grep2",
]
},
{
"type": "shell",
@@ -36,6 +57,5 @@
"group": "build",
"label": "tgui: run dev server"
}
,
]
}
+6 -1
View File
@@ -167,7 +167,12 @@ if __name__ == "__main__":
exit_code = 0
start = time.time()
for code_filepath in glob.glob("**/*.dm", recursive=True):
dm_files = glob.glob("**/*.dm", recursive=True)
if len(sys.argv) > 1:
dm_files = [sys.argv[1]]
for code_filepath in dm_files:
with open(code_filepath, encoding="UTF-8") as code:
filename = code_filepath.split(os.path.sep)[-1]
# 515 proc syntax check is unique in running on all files but one,