Showing 229 of 518 total issues
Function diff_lineMode_
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {
// Scan the text on a line-by-line basis first.
var a = this.diff_linesToChars_(text1, text2);
text1 = a.chars1;
text2 = a.chars2;
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Function loadMeta
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def loadMeta[F[_]](implicit messages: Messages, F: Sync[F]): EitherT[F, String, PluginFileWithData] = {
val fileNames = PluginFileData.fileNames
val res = newJarStream
.flatMap { in =>
Constructor has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
versionString: String,
dependencyIds: List[String],
description: Option[String],
projectId: Option[DbRef[Project]], // Version might be for an uncreated project
fileSize: Long,
Function asProtocol
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
): APIV2.Project = {
val iconPath = projectFiles.getIconPath(namespace.ownerName, name)
val iconUrl =
if (iconPath.isDefined)
controllers.project.routes.Projects.showIcon(namespace.ownerName, namespace.slug).absoluteURL()
Constructor has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
created_at: LocalDateTime,
plugin_id: String,
name: String,
namespace: ProjectNamespace,
recommended_version: Option[RecommendedVersion],
Constructor has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
service: ModelService[IO],
sso: SSOApi[IO],
bakery: Bakery,
config: OreConfig,
users: UserBase[IO],
Function diff_compute_
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,
deadline) {
var diffs;
if (!text1) {
Function diff_fromDelta
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_fromDelta = function(text1, delta) {
var diffs = [];
var diffsLength = 0; // Keeping our own length var is faster in JS.
var pointer = 0; // Cursor in text1
var tokens = delta.split(/\t/g);
Function show
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function backdrop
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function createProjectTopic
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def createProjectTopic(project: Model[Project]): F[Model[Project]] = {
val title = Templates.projectTitle(project)
implicit val mdc: DiscourseMDC = DiscourseMDC(project.ownerName, None, title)
Function initChannelManager
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initChannelManager(toggle, channelName, channelHex, title, call, method, submit, nonReviewed) {
$(toggle).off('click'); // Unbind previous click handlers
$(toggle).click(function() {
var modal = getModal();
var preview = modal.find('.preview');
Function loadActions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadActions(increment, action) {
pages[action] += increment;
var offset = (pages[action] - 1) * CONTENT_PER_PAGE;
apiV2Request('users/' + USERNAME + '/' + action + '?offset=' + offset + '&limit=' + CONTENT_PER_PAGE).then(function (result) {
Function diff_main
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,
opt_deadline) {
// Set a deadline by which time the diff must be complete.
if (typeof opt_deadline == 'undefined') {
if (this.Diff_Timeout <= 0) {
Function activate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
Function initUserSearch
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initUserSearch(callback) {
var search = $('.user-search');
var input = search.find('input');
// Disable button with no input
Function patch_addPadding
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.patch_addPadding = function(patches) {
var paddingLength = this.Patch_Margin;
var nullPadding = '';
for (var x = 1; x <= paddingLength; x++) {
nullPadding += String.fromCharCode(x);
Function getQueue
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val getQueue: Query0[UnsortedQueueEntry] = {
val reviewStateId = ReviewState.Unreviewed.value
sql"""|SELECT sq.project_author,
| sq.project_slug,
| sq.project_name,
Function getProjects
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
): Query0[ProjectListEntry] = {
val visibilityFrag =
if (canSeeHidden) None
else
currentUserId.fold(Some(fr"(p.visibility = 1)")) { id =>