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
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
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)
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)