|
|
|
@ -4,7 +4,6 @@ from __future__ import print_function
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import ast
|
|
|
|
import ast
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
import argparse
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.utils.module_docs import get_docstring, BLACKLIST_MODULES
|
|
|
|
from ansible.utils.module_docs import get_docstring, BLACKLIST_MODULES
|
|
|
|
@ -79,8 +78,8 @@ class ModuleValidator(object):
|
|
|
|
if (isinstance(child.value.func, ast.Name) and
|
|
|
|
if (isinstance(child.value.func, ast.Name) and
|
|
|
|
child.value.func.id == 'main'):
|
|
|
|
child.value.func.id == 'main'):
|
|
|
|
lineno = child.lineno
|
|
|
|
lineno = child.lineno
|
|
|
|
if lineno != self.length:
|
|
|
|
if lineno < self.length - 1:
|
|
|
|
self.warnings.append('Call to main() not the last '
|
|
|
|
self.errors.append('Call to main() not the last '
|
|
|
|
'line')
|
|
|
|
'line')
|
|
|
|
|
|
|
|
|
|
|
|
if not lineno:
|
|
|
|
if not lineno:
|
|
|
|
|