mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-27 18:21:15 +00:00
CI rename and enable warnfail, enforce mode always on
This commit is contained in:
parent
2c9d60fe1e
commit
7c1821a0e8
@ -1,9 +1,9 @@
|
|||||||
name: Decomp marker linting
|
name: Analyze
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
decomplint:
|
decomp-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -15,5 +15,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Run decomplint.py
|
- name: Run decomplint.py
|
||||||
run: |
|
run: |
|
||||||
python3 tools/decomplint/decomplint.py --enforce ISLE --module ISLE
|
python3 tools/decomplint/decomplint.py ISLE --module ISLE --warnfail
|
||||||
python3 tools/decomplint/decomplint.py --enforce LEGO1 --module LEGO1
|
python3 tools/decomplint/decomplint.py LEGO1 --module LEGO1 --warnfail
|
||||||
@ -38,12 +38,6 @@ def parse_args() -> argparse.Namespace:
|
|||||||
description="Syntax checking and linting for decomp annotation markers."
|
description="Syntax checking and linting for decomp annotation markers."
|
||||||
)
|
)
|
||||||
p.add_argument("target", help="The file or directory to check.")
|
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(
|
p.add_argument(
|
||||||
"--module",
|
"--module",
|
||||||
required=False,
|
required=False,
|
||||||
@ -54,7 +48,7 @@ def parse_args() -> argparse.Namespace:
|
|||||||
"--warnfail",
|
"--warnfail",
|
||||||
action=argparse.BooleanOptionalAction,
|
action=argparse.BooleanOptionalAction,
|
||||||
default=False,
|
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()
|
(args, _) = p.parse_known_args()
|
||||||
@ -97,7 +91,7 @@ def main():
|
|||||||
print(colorama.Style.RESET_ALL, end="")
|
print(colorama.Style.RESET_ALL, end="")
|
||||||
|
|
||||||
would_fail = error_count > 0 or (warning_count > 0 and args.warnfail)
|
would_fail = error_count > 0 or (warning_count > 0 and args.warnfail)
|
||||||
if args.enforce and would_fail:
|
if would_fail:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user