From bb2cebbc99e33bd15fe7163f080e42d497051315 Mon Sep 17 00:00:00 2001 From: Eirik Martiniussen Sylliaas Date: Wed, 15 May 2024 09:53:23 +0200 Subject: [PATCH] Exit 1 if linter has violations (#24) --- oida/console.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oida/console.py b/oida/console.py index c7a788e..21784d8 100644 --- a/oida/console.py +++ b/oida/console.py @@ -57,7 +57,8 @@ def main() -> None: args = parser.parse_args() if args.command == "lint": - if not run_linter(*args.paths, checks=args.checks): + has_violations = run_linter(*args.paths, checks=args.checks) + if has_violations: sys.exit(1) elif args.command == "config": generate_config(args.project_root) diff --git a/pyproject.toml b/pyproject.toml index aa63e52..d8f7e46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oida" -version = "0.2.0" +version = "0.2.1" description = "Oida is Oda's linter that enforces code style and modularization in our Django projects." authors = ["Oda "] license = "MIT"