Showing 284 of 423 total issues
File codemirror.js
has 7702 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// This is CodeMirror (http://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
Function addEditorMethods
has 378 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addEditorMethods(CodeMirror) {
var optionHandlers = CodeMirror.optionHandlers
var helpers = CodeMirror.helpers = {}
File css.js
has 763 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
File css.js
has 753 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
CodeMirror.defineMode("css", function(config, parserConfig) {
var inline = parserConfig.inline
Db
has 82 methods (exceeds 20 allowed). Consider refactoring. Open
Open
func (it *Db) ChunkSize() int {
switch it.Database.Dialect().GetName() {
case "mysql":
return 3000
case "postgres":
Api
has 63 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Api {
constructor() {
this.version = "0.90.74";
this.commit = "2612402a7782f28ca0b7fc10c941d8c4a1a5acc6";
}
Function importCli
has a Cognitive Complexity of 56 (exceeds 20 allowed). Consider refactoring. Open
Open
func importCli(args []string) error {
var err error
var data []byte
if len(args) < 1 {
return errors.New("invalid command arguments")
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
`` has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
methods: {
now() {
return new Date()
},
isNumeric: function (n) {
Function defineOptions
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defineOptions(CodeMirror) {
var optionHandlers = CodeMirror.optionHandlers
function option(name, deflt, handle, notOnInit) {
CodeMirror.defaults[name] = deflt
Function rangePlugin
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function rangePlugin(config) {
if (config === void 0) {
config = {};
}
Function rangePlugin
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function rangePlugin(config) {
if (config === void 0) {
config = {};
}
Function leftButtonSelect
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function leftButtonSelect(cm, event, start, behavior) {
var display = cm.display, doc = cm.doc
e_preventDefault(event)
var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges
`` has 34 functions (exceeds 20 allowed). Consider refactoring. Open
Open
getters: {
hasAllData: state => state.hasAllData,
hasPublicData: state => state.hasPublicData,
admin: state => state.admin,
core: state => state.core,
Function bidiOrdering
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var bidiOrdering = (function() {
// Character types for codepoints 0 to 0xff
var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"
// Character types for codepoints 0x600 to 0x6f9
var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"
Function Samples
has 122 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Samples() error {
log.Infoln("Inserting Sample Services...")
createdOn := utils.Now().Add(((-24 * 30) * 3) * time.Hour)
s1 := &Service{
Name: "Google",
Function Router
has 120 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Router() *mux.Router {
dir := utils.Directory
r := mux.NewRouter().StrictSlash(true)
r.Use(prometheusMiddleware)
Function registerEventHandlers
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function registerEventHandlers(cm) {
var d = cm.display
on(d.scroller, "mousedown", operation(cm, onMouseDown))
// Older IE's will not fire a second mousedown for a double click
if (ie && ie_version < 11)
File database.go
has 560 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package database
import (
"database/sql"
"fmt"
Function importCli
has 109 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func importCli(args []string) error {
var err error
var data []byte
if len(args) < 1 {
return errors.New("invalid command arguments")
Function drawSelectionRange
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSelectionRange(cm, range, output) {
var display = cm.display, doc = cm.doc
var fragment = document.createDocumentFragment()
var padding = paddingH(cm.display), leftSide = padding.left
var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right