def test_no_tabs(self):
        error = False

        for f in self.md_files:
            lines = grep(cat(f), "\t")
            if len(lines) > 0:
                print('error: in {} has tabs in {} lines'.format(f, lines))
                error = True

        self.assertEqual(False, error)
Example #2
0
    def test_no_tabs(self):
        error = False

        for f in self.md_files:
            lines = grep(cat(f), "\t")
            if len(lines) > 0:
                print('error: in {} has tabs in {} lines'.format(f, lines))
                error = True

        self.assertEqual(False, error)
Example #3
0
def check_no_trailing_spaces():
    print_caller_name()
    error = False
    global root
    files = gglob(root, "*.md")
    for f in files:
        lines = grep(cat(f), ".*[ ]+$")
        if len(lines) > 0:
            print('error: in {} has space in the end of lines {}'.format(f, lines))
            error = True
    return error
Example #4
0
def check_no_tabs():
    print_caller_name()
    error = False
    global root
    files = gglob(root, "*.md")
    for f in files:
        lines = grep(cat(f), "\t")
        if len(lines) > 0:
            print('error: in {} has tabs in {} lines'.format(f, lines))
            error = True
    return error
def check_if_control_questions_exist(file):
    lines = cat(file)
    findings = grep(lines, header)
    return len(findings)
 def test_no_trailing_spaces(self):
     for file in self.md_files:
         lines = grep(cat(file), ".*[ ]+$")
         self.assertEqual(0, len(lines))
Example #7
0
 def test_no_trailing_spaces(self):
     for file in self.md_files:
         lines = grep(cat(file), ".*[ ]+$")
         self.assertEqual(0, len(lines))
def check_if_control_questions_exist(file):
    lines = cat(file)
    findings = grep(lines, header)
    return len(findings)