Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description='.xib / .storyboard linter',
epilog=make_epilog_text(),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument("-v", "--version", action="version",
version=__version__)
parser.add_argument("--reporter", choices=("raw", "json"),
default="raw",
help="custom reporter to use")
parser.add_argument("paths", nargs=argparse.REMAINDER,
help="lint only at the specified paths")
args = parser.parse_args()
try:
from xiblint.config import Config
config = Config()
except IOError as ex:
print('Error: {}\n'.format(ex))
parser.print_usage()
sys.exit(1)
except ValueError as ex:
print('Error: {}: {}\n'.format(Config.filename, ex))
parser.print_usage()
sys.exit(1)
#
# Process paths
#
errors = []
include_paths = args.paths or config.include_paths
for path in include_paths:
if os.path.isfile(path):