Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit 1 if linter has violations #24

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion oida/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <tech@oda.com>"]
license = "MIT"
Expand Down
Loading