How to use the bashate.bashate.BashateRun function in bashate

To help you get started, we’ve selected a few bashate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / bashate / bashate / bashate.py View on Github external
opts = parser.parse_args(args)

    if opts.version:
        print("bashate: %s" % bashate.__version__)
        sys.exit(0)

    if opts.show:
        messages.print_messages()
        sys.exit(0)

    files = opts.files
    if not files:
        parser.print_usage()
        return 1

    run = BashateRun()
    run.register_ignores(opts.ignore)
    run.register_warnings(opts.warn)
    run.register_errors(opts.error)

    try:
        run.check_files(files, opts.verbose)
    except IOError as e:
        print("bashate: %s" % e)
        return 1

    if run.warning_count > 0:
        print("%d bashate warning(s) found" % run.warning_count)

    if run.error_count > 0:
        print("%d bashate error(s) found" % run.error_count)
        return 1

bashate

A pep8 equivalent for bash scripts

Apache-2.0
Latest version published 2 years ago

Package Health Score

66 / 100
Full package analysis

Similar packages