コード例 #1
0
ファイル: hdlcc_base.py プロジェクト: suoto/hdlcc
    def getMessagesBySource(self, source, batch_mode=False):
        """
        Returns the messages for the given source, including messages
        from the configured builder (if available) and static checks
        Extra arguments are
        """
        self._setupEnvIfNeeded()

        if self._USE_THREADS:
            records = []
            pool = ThreadPool()

            static_check = pool.apply_async(
                getStaticMessages, args=(source.getSourceContent().split('\n'), ))

            if self._isBuilderCallable():
                builder_check = pool.apply_async(self._getBuilderMessages,
                                                 args=[source, batch_mode])
                records += builder_check.get()

            records += static_check.get()

            pool.terminate()
            pool.join()
        else:
            records = getStaticMessages(source.getSourceContent().split('\n'))
            if self._isBuilderCallable():
                records += self._getBuilderMessages(source, batch_mode)

        self._saveCache()
        return records
コード例 #2
0
ファイル: hdlcc_base.py プロジェクト: seadanda/hdlcc
    def getMessagesBySource(self, source, batch_mode=False):
        """
        Returns the messages for the given source, including messages
        from the configured builder (if available) and static checks
        Extra arguments are
        """
        self._setupEnvIfNeeded()

        if self._USE_THREADS:
            records = []
            pool = ThreadPool()

            static_check = pool.apply_async(
                getStaticMessages,
                args=(source.getRawSourceContent().split('\n'), ))

            if self._isBuilderCallable():
                builder_check = pool.apply_async(self._getBuilderMessages,
                                                 args=[source, batch_mode])
                records += builder_check.get()

            records += static_check.get()

            pool.terminate()
            pool.join()
        else:
            records = getStaticMessages(
                source.getRawSourceContent().split('\n'))
            if self._isBuilderCallable():
                records += self._getBuilderMessages(source, batch_mode)

        self._saveCache()
        return records
コード例 #3
0
ファイル: standalone.py プロジェクト: suoto/hdlcc
def runStandaloneStaticCheck(fname):
    """Standalone source_file.VhdlParser run"""
    from hdlcc.static_check import getStaticMessages

    lines = [x.decode(errors='ignore') for x in open(fname, mode='rb').readlines()]
    for record in getStaticMessages(lines):
        print(record)
コード例 #4
0
ファイル: standalone.py プロジェクト: seadanda/hdlcc
def runStandaloneStaticCheck(fname):
    """Standalone source_file.VhdlParser run"""
    from hdlcc.static_check import getStaticMessages

    lines = [
        x.decode(errors='ignore') for x in open(fname, mode='rb').readlines()
    ]
    for record in getStaticMessages(lines):
        print(record)