Skip to content

Not getting any data in pair array #1063

Closed Answered by rien
VedikaGujar-GSLab asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, in version 2.1.0 we've changed how we calculate pairs in order to reduce memory usage. We no longer have a list of scored pairs in the Report object that is the result of analyzePaths. Instead, you can call the allPairs() function. You can change your code to this:

const dolos = require("@dodona/dolos-lib");
const instance = new dolos.Dolos();
const reportPromise = instance.analyzePaths(files);

reportPromise.then(
  function(report) {
    const pairs = report.allPairs();
    console.log( JSON.stringify(pairs));
  },
  function(err) {
    console.log(err);
  }
);

You could also set report.scored = report.allPairs(); if you want to do minimal changes to your code.

There are other smal…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rien
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants