예제 #1
0
    def start(self):
        if self.javac.args.version:
            if self.args.buck:
                key = self.args.analyzer
                print(utils.infer_key(key), file=sys.stderr)
            else:
                return self.javac.run()
        else:
            start_time = time.time()
            if self.capture() == os.EX_OK:
                self.timing['capture'] = utils.elapsed_time(start_time)
                self.analyze_and_report()
                self.close()
                elapsed = utils.elapsed_time(start_time)
                self.timing['total'] = elapsed
                self.save_stats()

                if not self.args.analyzer in [COMPILE, CAPTURE]:
                    procs_total = self.stats['int']['procedures']
                    files_total = self.stats['int']['files']
                    procs_str = utils.get_plural('procedure', procs_total)
                    files_str = utils.get_plural('file', files_total)
                    print('\nAnalyzed %s in %s' % (procs_str, files_str))
                return self.stats
            else:
                return dict({})
예제 #2
0
파일: inferlib.py 프로젝트: hckhanh/infer
    def start(self):
        if self.javac.args.version:
            if self.args.buck:
                key = self.args.analyzer
                print(utils.infer_key(key), file=sys.stderr)
            else:
                return self.javac.run()
        else:
            start_time = time.time()
            if self.capture() == os.EX_OK:
                self.timing['capture'] = utils.elapsed_time(start_time)
                self.analyze_and_report()
                self.close()
                elapsed = utils.elapsed_time(start_time)
                self.timing['total'] = elapsed
                self.save_stats()

                if not self.args.analyzer in [COMPILE, CAPTURE]:
                    procs_total = self.stats['int']['procedures']
                    files_total = self.stats['int']['files']
                    procs_str = utils.get_plural('procedure', procs_total)
                    files_str = utils.get_plural('file', files_total)
                    print('\nAnalyzed %s in %s' % (procs_str, files_str))
                return self.stats
            else:
                return dict({})
예제 #3
0
    def start(self):
        if self.javac.args.version:
            if self.args.buck:
                key = self.args.analyzer
                print(utils.infer_key(key), file=sys.stderr)
            else:
                return self.javac.run()
        else:
            start_time = time.time()

            self.compile()
            if self.args.analyzer == COMPILE:
                return os.EX_OK

            self.run_infer_frontend()
            self.timing["capture"] = utils.elapsed_time(start_time)
            if self.args.analyzer == CAPTURE:
                return os.EX_OK

            self.analyze_and_report()
            self.close()
            self.timing["total"] = utils.elapsed_time(start_time)
            self.save_stats()

            procs_total = self.stats["int"]["procedures"]
            files_total = self.stats["int"]["files"]
            procs_str = utils.get_plural("procedure", procs_total)
            files_str = utils.get_plural("file", files_total)
            print("\nAnalyzed %s in %s" % (procs_str, files_str))

            return self.stats
예제 #4
0
파일: inferlib.py 프로젝트: 283958849/infer
 def start(self):
     if self.javac.args.version:
         if self.args.buck:
             key = self.args.analyzer
             print(utils.infer_key(key), file=sys.stderr)
         else:
             return self.javac.run()
     else:
         start_time = time.time()
         if self.capture() == os.EX_OK:
             self.timing["capture"] = utils.elapsed_time(start_time)
             self.analyze_and_report()
             self.close()
             elapsed = utils.elapsed_time(start_time)
             self.timing["total"] = elapsed
             self.save_stats()
             return self.stats
         else:
             return dict({})
예제 #5
0
 def start(self):
     if self.javac.args.version:
         if self.args.buck:
             key = self.args.analyzer
             print(utils.infer_key(key), file=sys.stderr)
         else:
             return self.javac.run()
     else:
         start_time = time.time()
         if self.capture() == os.EX_OK:
             self.timing['capture'] = utils.elapsed_time(start_time)
             self.analyze_and_report()
             self.close()
             elapsed = utils.elapsed_time(start_time)
             self.timing['total'] = elapsed
             self.save_stats()
             return self.stats
         else:
             return dict({})