def __init__(self): self.vcs = GitProvider(config.getRepoDir()) self.ccdb = CCDatabase(config.getCcDbFile()) self.codeChecker = CodeChecker(config.getRepoDir()) self.checkers = Checkers() self.loadCommitList()
def testDatabaseOpenExistingSuccess(self): dbPath = config.getCcDbFile() db = CCDatabase(dbPath) self.assertEqual(len(db.getAllReports()), 0)
def fix(code, bugData): if bugData.getChecker() == 'deadcode.DeadStores': return fixDeadStore(code, bugData) if bugData.getChecker( ) == 'clang-diagnostic-tautological-constant-out-of-range-compare': return findTautOORCmp(code, bugData) if bugData.getChecker() == 'clang-diagnostic-unused-parameter': return fixUnusedParam(code, bugData) if bugData.getChecker() == 'clang-diagnostic-constant-conversion': return fixConstConv(code, bugData) return None ccdb = CCDatabase(config.getCcDbFile()) db = sqlite3.connect('../Results/db.sqlite') cursor = db.cursor() cursor.execute('SELECT * FROM bugs') dataFromDb = cursor.fetchall() bugs = [] bugsPerFile = {} BUG_NOT_PROCESSED = 0 vcs = GitProvider(config.getRepoDir()) checkers = Checkers() currentCommit = vcs.getAllVersions(config.getBranch())[0] bugDataList = {} fileContents = {} codechecker = CodeChecker(config.getRepoDir()) if len(dataFromDb) > 0:
def __init__(self): self.vcs = GitProvider(config.getRepoDir()) self.ccdb = CCDatabase(config.getCcDbFile()) self.codeChecker = CodeChecker(config.getRepoDir())
def __init__(self): self.ccdb = CCDatabase(config.getCcDbFile()) self.codeChecker = CodeChecker(config.getRepoDir()) self.code = [] self.checkers = Checkers()