diff --git a/.github/workflows/order.yml b/.github/workflows/analyze.yml similarity index 55% rename from .github/workflows/order.yml rename to .github/workflows/analyze.yml index be766ad2..d3817d81 100644 --- a/.github/workflows/order.yml +++ b/.github/workflows/analyze.yml @@ -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 diff --git a/tools/decomplint/decomplint.py b/tools/decomplint/decomplint.py index 83d65a2b..2ceb42c2 100644 --- a/tools/decomplint/decomplint.py +++ b/tools/decomplint/decomplint.py @@ -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)