Examples of effortToFix()


Examples of org.sonar.api.batch.sensor.issue.internal.DefaultIssue.effortToFix()

      }
    } else {
      value.putNull();
    }
    value.put(issue.message());
    value.put(issue.effortToFix());
    value.put(issue.ruleKey().repository());
    value.put(issue.ruleKey().rule());
    Severity overridenSeverity = issue.overridenSeverity();
    if (overridenSeverity == null) {
      value.putNull();
View Full Code Here

Examples of org.sonar.api.batch.sensor.issue.internal.DefaultIssue.effortToFix()

          newIssue.atLine(value.getInt());
        }
      }
    }
    newIssue.message(value.getString());
    newIssue.effortToFix(value.isNull(true) ? null : value.getDouble());
    String repo = value.getString();
    String rule = value.getString();
    newIssue.ruleKey(RuleKey.of(repo, rule));
    newIssue.overrideSeverity(value.isNull(true) ? null : Severity.values()[value.getInt()]);
    return newIssue;
View Full Code Here

Examples of org.sonar.api.issue.Issue.effortToFix()

    // Check all normalized fields
    assertThat(issueDoc.actionPlanKey()).isEqualTo(issue.getActionPlanKey());
    assertThat(issueDoc.assignee()).isEqualTo(issue.getAssignee());
    assertThat(issueDoc.authorLogin()).isEqualTo(issue.getAuthorLogin());
    assertThat(issueDoc.closeDate()).isEqualTo(issue.getIssueCloseDate());
    assertThat(issueDoc.effortToFix()).isEqualTo(issue.getEffortToFix());
    assertThat(issueDoc.resolution()).isEqualTo(issue.getResolution());
    assertThat(issueDoc.ruleKey()).isEqualTo(RuleKey.of(issue.getRuleRepo(), issue.getRule()));
    assertThat(issueDoc.line()).isEqualTo(issue.getLine());
    assertThat(issueDoc.message()).isEqualTo(issue.getMessage());
    assertThat(issueDoc.reporter()).isEqualTo(issue.getReporter());
View Full Code Here

Examples of org.sonar.api.issue.Issue.effortToFix()

    Issue issue = argumentCaptor.getValue();
    assertThat(issue.ruleKey()).isEqualTo(RuleKey.of("foo", "bar"));
    assertThat(issue.message()).isEqualTo("Foo");
    assertThat(issue.line()).isNull();
    assertThat(issue.severity()).isEqualTo("BLOCKER");
    assertThat(issue.effortToFix()).isEqualTo(10.0);
  }

  @Test
  public void shouldStoreDependencyInSameFolder() {
View Full Code Here

Examples of org.sonar.api.issue.Issue.effortToFix()

    Issue issue = argumentCaptor.getValue();
    assertThat(issue.ruleKey()).isEqualTo(RuleKey.of("foo", "bar"));
    assertThat(issue.message()).isEqualTo("Foo");
    assertThat(issue.line()).isEqualTo(3);
    assertThat(issue.severity()).isNull();
    assertThat(issue.effortToFix()).isEqualTo(10.0);
  }

  @Test
  public void shouldAddIssueOnDirectory() {
    InputDir dir = new DefaultInputDir("foo", "src");
View Full Code Here

Examples of org.sonar.api.issue.Issue.effortToFix()

    Issue issue = argumentCaptor.getValue();
    assertThat(issue.ruleKey()).isEqualTo(RuleKey.of("foo", "bar"));
    assertThat(issue.message()).isEqualTo("Foo");
    assertThat(issue.line()).isNull();
    assertThat(issue.severity()).isNull();
    assertThat(issue.effortToFix()).isEqualTo(10.0);
  }

  @Test
  public void shouldAddIssueOnProject() {
    ArgumentCaptor<Issue> argumentCaptor = ArgumentCaptor.forClass(Issue.class);
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.effortToFix()

      .attribute("YOUTRACK", "YT-123")
      .build();

    assertThat(issue).isNotNull();
    assertThat(issue.key()).isNotNull();
    assertThat(issue.effortToFix()).isEqualTo(10000.0);
    assertThat(issue.componentKey()).isEqualTo(componentKey);
    assertThat(issue.projectKey()).isEqualTo(projectKey);
    assertThat(issue.message()).isEqualTo("the message");
    assertThat(issue.line()).isEqualTo(123);
    assertThat(issue.ruleKey().repository()).isEqualTo("squid");
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.effortToFix()

    assertThat(issue.moduleUuidPath()).isEqualTo("ABCD.BCDE.");
    assertThat(issue.projectUuid()).isEqualTo("ABCD");
    assertThat(issue.projectKey()).isEqualTo("org.sonar.sample");
    assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
    assertThat(issue.resolution()).isEqualTo(Issue.RESOLUTION_FALSE_POSITIVE);
    assertThat(issue.effortToFix()).isEqualTo(15.0);
    assertThat(issue.debt()).isEqualTo(Duration.create(10L));
    assertThat(issue.line()).isEqualTo(6);
    assertThat(issue.severity()).isEqualTo("BLOCKER");
    assertThat(issue.message()).isEqualTo("message");
    assertThat(issue.manualSeverity()).isTrue();
View Full Code Here

Examples of org.sonar.server.issue.index.IssueDoc.effortToFix()

    assertThat(manualIssue.projectUuid()).isEqualTo(project.uuid());
    assertThat(manualIssue.ruleKey()).isEqualTo(manualRule.getKey());
    assertThat(manualIssue.message()).isEqualTo("Fix it");
    assertThat(manualIssue.line()).isEqualTo(10);
    assertThat(manualIssue.severity()).isEqualTo(Severity.MINOR);
    assertThat(manualIssue.effortToFix()).isEqualTo(2d);
    assertThat(manualIssue.reporter()).isEqualTo(connectedUser.getLogin());
  }

  @Test
  public void create_manual_issue_with_major_severity_when_no_severity() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.