feat: debug parser
All checks were successful
build / build (push) Successful in 1m43s
build / trigger-build-image (push) Successful in 12s

This commit is contained in:
张泊明518370910136 2025-10-03 01:17:48 -07:00
parent 32997cfdcb
commit 930830b6f6
GPG Key ID: D47306D7062CDA9D
4 changed files with 23 additions and 10 deletions

View File

@ -170,6 +170,7 @@ class Parser(str, Enum):
KEYWORD = "keyword"
RESULT_STATUS = "result-status"
RESULT_DETAIL = "result-detail"
DEBUG = "debug"
DUMMY = "dummy"
FILE = "file"
DIFF = "diff"

View File

@ -5,6 +5,7 @@ from pathlib import Path, PurePosixPath
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from joj3_config_generator.models import result, task
from joj3_config_generator.models.common import StrictBaseModel
from joj3_config_generator.models.const import DEFAULT_PATH_ENV, JOJ3_CONFIG_ROOT
from joj3_config_generator.utils.logger import logger
@ -58,6 +59,7 @@ def get_parser_handler_map(
task.Parser.CPPCHECK: (fix_keyword, task_stage.cppcheck),
task.Parser.CPPLINT: (fix_keyword, task_stage.cpplint),
task.Parser.RESULT_DETAIL: (fix_result_detail, task_stage.result_detail),
task.Parser.DEBUG: (fix_empty, None),
task.Parser.DUMMY: (fix_dummy, task_stage.dummy),
task.Parser.RESULT_STATUS: (fix_result_status, task_stage.result_status),
task.Parser.FILE: (fix_file, task_stage.file),
@ -173,6 +175,10 @@ def fix_dummy(
)
def fix_empty(parser_config: StrictBaseModel, parser: result.Parser) -> None:
pass
def fix_result_status(
result_status_parser_config: task.ParserResultStatus,
result_status_parser: result.Parser,

View File

@ -345,14 +345,6 @@
]
}
},
{
"name": "dummy",
"with": {
"score": 0,
"comment": "",
"forceQuit": false
}
},
{
"name": "diff",
"with": {
@ -420,6 +412,18 @@
}
]
}
},
{
"name": "dummy",
"with": {
"score": 0,
"comment": "",
"forceQuit": false
}
},
{
"name": "debug",
"with": {}
}
]
}

View File

@ -93,15 +93,17 @@ limit.proc = 50 # process limit, default: 50
parsers = [
"result-status", # check if result status is Accepted
"result-detail", # show result details (CPU time, memory, etc.)
# ========== match keywords style parsers start ==========
# ========== match keywords style parsers start ========
"keyword", # match keywords in the output and score them
"clangtidy", # parse clang-tidy output, and match keywords
"cppcheck", # parse cppcheck output, and match keywords
"cpplint", # parse cpplint output, and match keywords
"elf", # parse elf (static analyzer for elm) output, and match keywords
# ========== match keywords style parsers end ==========
"dummy", # dummy parser, used to show a comment
"diff", # diff the output with the expected output
# ======================================================
"dummy", # dummy parser, used to show a comment
"debug", # debug parser, will log executor output files
]
result-status.score = 0 # score added if result status is Accepted, default: 0