Package repoman :: Module checks :: Class EbuildQuote
[hide private]

Class EbuildQuote

source code

object --+    
         |    
 LineCheck --+
             |
            EbuildQuote

Ensure ebuilds have valid quoting around things like D,FILESDIR, etc...

Instance Methods [hide private]
 
check(self, num, line)
Run the check on line and return error if there is one
source code

Inherited from LineCheck: check_eapi, end, new

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  repoman_check_name = u'ebuild.minorsyn'
  _message_commands = [u'die', u'echo', u'eerror', u'einfo', u'e...
  _message_re = re.compile(r'\s(die|echo|eerror|einfo|elog|eqawa...
  _ignored_commands = [u'local', u'export', u'die', u'echo', u'e...
  ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(l...
True if lines containing nothing more than comments with optional leading whitespace should be ignored
  ignore_comment = False
  var_names = u'(D|DISTDIR|FILESDIR|S|T|ROOT|WORKDIR|ED|EPREFIX|...
  var_reference = re.compile(r'\$(\{(D|DISTDIR|FILESDIR|S|T|ROOT...
  missing_quotes = re.compile(r'(\s|^)[^"\'\s]*\$\{?(D|DISTDIR|F...
  cond_begin = re.compile(r'(^|\s+)\[\[($|\\$|\s+)')
  cond_end = re.compile(r'(^|\s+)\]\]($|\\$|\s+)')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

check(self, num, line)

source code 

Run the check on line and return error if there is one

Overrides: LineCheck.check
(inherited documentation)

Class Variable Details [hide private]

_message_commands

Value:
[u'die', u'echo', u'eerror', u'einfo', u'elog', u'eqawarn', u'ewarn']

_message_re

Value:
re.compile(r'\s(die|echo|eerror|einfo|elog|eqawarn|ewarn)\s+"[^"]*"\s*\
$')

_ignored_commands

Value:
[u'local',
 u'export',
 u'die',
 u'echo',
 u'eerror',
 u'einfo',
 u'elog',
 u'eqawarn',
...

ignore_line

True if lines containing nothing more than comments with optional leading whitespace should be ignored

Value:
re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export|die|echo|e\
error|einfo|elog|eqawarn|ewarn)\s+)')

var_names

Value:
u'(D|DISTDIR|FILESDIR|S|T|ROOT|WORKDIR|ED|EPREFIX|EROOT|Ddir|GAMES_PRE\
FIX_OPT|GAMES_DATADIR|GAMES_DATADIR_BASE|GAMES_SYSCONFDIR|GAMES_STATED\
IR|GAMES_LOGDIR|GAMES_BINDIR|BUILD_DIR)'

var_reference

Value:
re.compile(r'\$(\{(D|DISTDIR|FILESDIR|S|T|ROOT|WORKDIR|ED|EPREFIX|EROO\
T|Ddir|GAMES_PREFIX_OPT|GAMES_DATADIR|GAMES_DATADIR_BASE|GAMES_SYSCONF\
DIR|GAMES_STATEDIR|GAMES_LOGDIR|GAMES_BINDIR|BUILD_DIR)\}|(D|DISTDIR|F\
ILESDIR|S|T|ROOT|WORKDIR|ED|EPREFIX|EROOT|Ddir|GAMES_PREFIX_OPT|GAMES_\
DATADIR|GAMES_DATADIR_BASE|GAMES_SYSCONFDIR|GAMES_STATEDIR|GAMES_LOGDI\
R|GAMES_BINDIR|BUILD_DIR)\W)')

missing_quotes

Value:
re.compile(r'(\s|^)[^"\'\s]*\$\{?(D|DISTDIR|FILESDIR|S|T|ROOT|WORKDIR|\
ED|EPREFIX|EROOT|Ddir|GAMES_PREFIX_OPT|GAMES_DATADIR|GAMES_DATADIR_BAS\
E|GAMES_SYSCONFDIR|GAMES_STATEDIR|GAMES_LOGDIR|GAMES_BINDIR|BUILD_DIR)\
\}?[^"\'\s]*(\s|$)')