mysamai/mysam-core

View on GitHub

Showing 4 of 4 total issues

Function populate has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function populate (target, options) {
options = Object.assign({}, options);
 
if (!options.service) {
throw new Error('You need to provide a service');
Severity: Minor
Found in lib/hooks/populate.js - About 1 hr to fix

    Function exports has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function () {
    const app = this;
     
    app.use('/classify', new Classifier());
     
     
    Severity: Minor
    Found in lib/services/classify/index.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      removeTraining (training) {
      this.classifier.removeDocument(training.text, training.action._id);
      this.retrain();
      }
      Severity: Minor
      Found in lib/services/classify/classify.class.js and 1 other location - About 35 mins to fix
      lib/services/classify/classify.class.js on lines 34..37

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      addTraining (training) {
      this.classifier.addDocument(training.text, training.action._id);
      this.retrain();
      }
      Severity: Minor
      Found in lib/services/classify/classify.class.js and 1 other location - About 35 mins to fix
      lib/services/classify/classify.class.js on lines 29..32
      Severity
      Category
      Status
      Source
      Language