All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.bjurr.violations.comments.lib.CommentsProvider Maven / Gradle / Ivy

There is a newer version: 1.109.0
Show newest version
package se.bjurr.violations.comments.lib;

import java.util.List;
import java.util.Optional;
import se.bjurr.violations.comments.lib.model.ChangedFile;
import se.bjurr.violations.comments.lib.model.Comment;

public interface CommentsProvider {

  /**
   * Creates a comment.
   *
   * @param string The comment.
   */
  void createComment(String string);

  /**
   * Create a discussion on the diff on the line the violation occurred.
   *
   * @param file The file in which the violation occurred.
   * @param line The line number after the patch.
   * @param comment The text of the comment.
   */
  void createSingleFileComment(ChangedFile file, Integer line, String comment);

  List getComments();

  List getFiles();

  void removeComments(List comments);

  boolean shouldComment(ChangedFile changedFile, Integer line);

  boolean shouldCreateCommentWithAllSingleFileComments();

  boolean shouldCreateSingleFileComment();

  boolean shouldKeepOldComments();

  boolean shouldCommentOnlyChangedFiles();

  Optional findCommentTemplate();

  Integer getMaxNumberOfViolations();

  Integer getMaxCommentSize();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy