go_agent/src/code.google.com/p/go.tools/godoc/static/playground.js
Function playground
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function playground(opts) {
var code = $(opts.codeEl);
var transport = opts['transport'] || new HTTPTransport();
var running;
File playground.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Function HTTPTransport
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
function HTTPTransport() {
'use strict';
// TODO(adg): support stderr
- 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
Function HTTPTransport
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function HTTPTransport() {
'use strict';
// TODO(adg): support stderr
Function SocketTransport
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SocketTransport() {
'use strict';
var id = 0;
var outputs = {};
Function PlaygroundOutput
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PlaygroundOutput(el) {
'use strict';
return function(write) {
if (write.Kind == 'start') {
Function Run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Run: function(body, output, options) {
seq++;
var cur = seq;
var playing;
$.ajax('/compile', {