'Check the javascript for references to unresolved spring variables.
We\'re going to assume that $ does not appear anywhere. If in fact
$ is needed for some other reason we can be more explicit looking for ${.*}.
However we will be more conservative to catch typos like forgetting the
opening or closing }.
Args: source [string]
Raises: ValueError if it found any'

def check_deck_settings(self, source):

    bad_lines = []
    for match in re.finditer('^(?!\\s*//\\s*var\\s+)(.*\\$.*)', source, re.MULTILINE):
        bad_lines.append(match.group(1))
    if bad_lines:
        raise ValueError('The    settings.js    seems    to    contain    unresolved    variable    references.\n        {0}'.format('\n        '.join(bad_lines)))
