#!/usr/bin/python3
import argparse
from linter import run_linter
import sys

parser = argparse.ArgumentParser()
parser.add_argument("-s", "--spec", type=str, help="Path to the yaml specification file", required=True)
parser.add_argument("-r", "--rule", type=str, help="Path to the rules that specification file must follow", required=True)
parser.add_argument("-o", "--output", type=str, help="Output the linting errors possible options, json | yaml. Default JSON", required=False, default="json")

args = parser.parse_args()

if not any(vars(args).values()):
    parser.print_help()
    sys.exit(1)

run_linter(args.spec, args.rule, args.output)