CI rename and enable warnfail, enforce mode always on

This commit is contained in:
disinvite 2023-12-12 13:33:54 -05:00
parent 2c9d60fe1e
commit 7c1821a0e8
2 changed files with 6 additions and 12 deletions

View File

@ -1,9 +1,9 @@
name: Decomp marker linting
name: Analyze
on: [push, pull_request]
jobs:
decomplint:
decomp-lint:
runs-on: ubuntu-latest
steps:
@ -15,5 +15,5 @@ jobs:
- name: Run decomplint.py
run: |
python3 tools/decomplint/decomplint.py --enforce ISLE --module ISLE
python3 tools/decomplint/decomplint.py --enforce LEGO1 --module LEGO1
python3 tools/decomplint/decomplint.py ISLE --module ISLE --warnfail
python3 tools/decomplint/decomplint.py LEGO1 --module LEGO1 --warnfail

View File

@ -38,12 +38,6 @@ def parse_args() -> argparse.Namespace:
description="Syntax checking and linting for decomp annotation markers."
)
p.add_argument("target", help="The file or directory to check.")
p.add_argument(
"--enforce",
action=argparse.BooleanOptionalAction,
default=False,
help="Fail if syntax errors are found.",
)
p.add_argument(
"--module",
required=False,
@ -54,7 +48,7 @@ def parse_args() -> argparse.Namespace:
"--warnfail",
action=argparse.BooleanOptionalAction,
default=False,
help="Fail if syntax warnings are found and enforce is enabled.",
help="Fail if syntax warnings are found.",
)
(args, _) = p.parse_known_args()
@ -97,7 +91,7 @@ def main():
print(colorama.Style.RESET_ALL, end="")
would_fail = error_count > 0 or (warning_count > 0 and args.warnfail)
if args.enforce and would_fail:
if would_fail:
sys.exit(1)