Showing 283 of 1,132 total issues
Function renderModifiedData
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderModifiedData: function(data) {
var _this = this;
this.$(".updated").remove();
this.c.selectAll('g.data-container')
.classed('background', false)
Function validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
validate: function() {
var errs = [],
yaliases = _.keys(this.get('badselection')),
drawing = this.get('drawing');
Function validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
validate: function() {
var errs = [],
yaliases = _.keys(this.get('badselection')),
drawing = this.get('drawing');
Function renderModifiedData
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderModifiedData: function(data) {
var _this = this;
this.$(".updated").remove();
this.c.selectAll('g.data-container')
.classed('background', false)
Method main
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void main(String [] args) {
try {
// Before running you will need to populate the below variables
// and create a corresponding repo and table in your datahub acount
Function bindButtonEvents
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Step.prototype.bindButtonEvents = function(cfg, el) {
var event, handler, page, _ref1,
_this = this;
if (cfg.events == null) {
cfg.events = {};
Function bindButtonEvents
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Step.prototype.bindButtonEvents = function(cfg, el) {
var event, handler, page, _ref1,
_this = this;
if (cfg.events == null) {
cfg.events = {};
Function import_file
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def import_file(username, repo_base, repo, table, file_name,
Function brushf
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brushf = function(p) {
var e = brush.extent()
var selected = {};
el.selectAll('.data-container:not(.background)')
.selectAll('.mark')
Function brushf
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var brushf = function(p) {
var e = brush.extent()
var selected = {};
el.selectAll('.data-container:not(.background)')
.selectAll('.mark')
Function get_columns_and_types
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_columns_and_types(self):
manager = DataHubManager(user=self.username, repo_base=self.repo_base)
tokens = self.tablename.split('.')
repo = tokens[0]
- 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 get_schema
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_schema(repo, table, username, repo_base):
""" gets the schema of a given repo.table in a repo_base """
manager = DataHubManager(user=username, repo_base=repo_base)
pairs = manager.get_schema(repo, table)
schema = {}
- 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 datahub_authenticate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def datahub_authenticate(username, password):
"""
Analog of django.contrib.auth.authenticate.
Given a username or email plus password, finds the User object, verifies
- 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 login
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def login(request):
"""
DataHub account login form.
GET returns and HttpResponse containing the account login form.
- 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 forEachRowInColumn
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
datatable.forEachRowInColumn = function(colName, func) {
var targets = -1;
columnDefs.forEach(function(columnDef) {
if (columnDef.name === colName) {
targets = columnDef.targets;
Function FilterModal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
DataQ.FilterModal = function(q, cb) {
// Set the instance variables.
callback = cb;
query = q;
Function forEachRowInColumn
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
datatable.forEachRowInColumn = function(colName, func) {
var targets = -1;
columnDefs.forEach(function(columnDef) {
if (columnDef.name === colName) {
targets = columnDef.targets;
Function test_public_repo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_public_repo(self):
# Django migrations.RunPython doesn't happen before each test.
# To work around this we call some methods (that should have been done
# in migrations) here.
# Django 1.8/1.9 https://code.djangoproject.com/ticket/23640
Function parse
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function(resp) {
//
// results: [ { score:, c_range:, clauses:, alt_clauses:, } ]
// top_k_results: {
// yalias: {
Function parse
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function(resp) {
//
// results: [ { score:, c_range:, clauses:, alt_clauses:, } ]
// top_k_results: {
// yalias: {