How to use the bashate.messages.MESSAGES 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
# under the License.

from __future__ import absolute_import

import argparse
import fileinput
import os
import re
import shlex
import subprocess
import sys

import bashate
from bashate import messages

MESSAGES = messages.MESSAGES


def is_continuation(line):
    return re.search('\\\\\s*$', line)


def check_for_do(line, report):
    if not is_continuation(line):
        match = re.match('^\s*(for|while|until)\s', line)
        if match:
            operator = match.group(1).strip()
            if operator == "for":
                # "for i in ..." and "for ((" is bash, but
                # "for (" is likely from an embedded awk script,
                # so skip it
                if re.search('for \([^\(]', line):

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