Ejemplo n.º 1
0
    def lines_of_code(self):
        files_paths = StringUtils.search_java_files(self.project_directory)
        print(f"Files paths: {files_paths}")
        print(f"Files paths len: {len(files_paths)}")

        project_lines = 0
        for path in files_paths:
            with open(path, 'r') as f:
                line = f.readline()
                while line:
                    print(f"LINE: {line}")
                    line = f.readline()
                    # if self.is_valid_line(line):
                    project_lines += 1

        print(f"PROJECT LINES: {project_lines}")