wurmlab/sequenceserver

View on GitHub

Showing 120 of 7,487 total issues

Function renderDatum has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.renderDatum = function(parentElement, conf, layout, utils) {
        var bin;
        bin = parentElement.selectAll('.bin').data(function(d) {
            return d.values;
        }).enter().append('path').attr('class', 'bin').attr('opacity', function(d) {
Severity: Minor
Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

    Function hitLinks has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        hitLinks() {
            var btns = [];
            if (!(this.props.imported_xml || this.props.non_parse_seqids)) {
                btns = btns.concat([
                    this.viewSequenceButton(),
    Severity: Minor
    Found in public/js/hit.js - About 1 hr to fix

      Function hit_details has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                              _.bind(function (hit) {
                                  if (hit.number < num_hits) {
                                      var hsp_details = _.map(
                                          hit.hsps,
                                          _.bind(function (hsp) {
      Severity: Minor
      Found in public/js/circos.js - About 1 hr to fix

        Function renderAxes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.renderAxes = function(parentElement, conf, layout, data) {
                var axes, axis, x;
                if (conf.axes.minor.spacingType === 'pixel') {
                    axes = (function() {
                        var l, ref, ref1, ref2, results;
        Severity: Minor
        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

          Function overviewJSX has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              overviewJSX() {
                  return (
                      <div className="overview">
                          <p>
                              <strong>SequenceServer {this.state.seqserv_version}</strong> using{' '}
          Severity: Minor
          Found in public/js/report.js - About 1 hr to fix

            Method tree has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                  def tree
                    all.each_with_object({}) do |db, data|
                      data[db.type] ||= []
                      use_parent = '#'
                      db.categories.each_with_index do |entry, index|
            Severity: Minor
            Found in lib/sequenceserver/database.rb - About 1 hr to fix

            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 smartBorders has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            circosJS.Core.prototype.smartBorders = function() {
                var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
                width = this.conf.defaultTrackWidth;
                layout = {
                    'in': this._layout.conf.innerRadius,
            Severity: Minor
            Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

            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 parsedOptions has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                parsedOptions(textValue) {
                    const words = textValue.split(" ");
                    let parsedOptions = this.defaultObjectValue();
                    // Iterate through the words in steps of 2, treating each pair as an option and its potential value
                    for (let i = 0; i < words.length; i += 2) {
            Severity: Minor
            Found in public/js/options.js - About 1 hr to fix

            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 render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const { formState } = this.state;
            
                let content;
                switch (formState) {
            Severity: Minor
            Found in public/js/cloud_share_modal.js - About 1 hr to fix

              Function renderChords has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
                      var link, track;
                      track = parentElement.append('g').attr('class', conf.colorPalette);
                      link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', d3.svg.chord().source(function(d) {
                          return getSource(d, layout);
              Severity: Minor
              Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                Function render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    render() {
                        return (
                            <div className="relative">
                                <div
                                    className="sequence">
                Severity: Minor
                Found in public/js/query.js - About 1 hr to fix

                  Function warningJSX has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      warningJSX() {
                          return(
                              <div className="container">
                                  <div className="row">
                                      <div className="col-md-6 col-md-offset-3 text-center">
                  Severity: Minor
                  Found in public/js/report.js - About 1 hr to fix

                    Function componentDidMount has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        componentDidMount() {
                            /**
                            * Fetch data to initialise the search interface from the server. These
                            * include list of databases to search against, advanced options to
                            * apply when an algorithm is selected, and a query sequence that
                    Severity: Minor
                    Found in public/js/form.js - About 1 hr to fix

                      Function applyRules has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          this.applyRules = function(rules, data) {
                              var datum, i, k, results, rule, v;
                              rules = rules || [];
                              results = [];
                              for (k in data) {
                      Severity: Minor
                      Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                        Function renderBlock has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            this.renderBlock = function(parentElement, data, layout, conf) {
                                var block, scope;
                                scope = conf.outerRadius - conf.innerRadius;
                                block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function(d) {
                                    return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';
                        Severity: Minor
                        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                          Function determineBlastMethods has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              determineBlastMethods() {
                                  var database_type = this.databaseType;
                                  var sequence_type = this.sequenceType;
                          
                                  if (this.refs.query.isEmpty()) {
                          Severity: Minor
                          Found in public/js/form.js - About 1 hr to fix

                            Function Text has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            circosJS.Text = function() {
                                circosJS.Track.call(this);
                                this.parseData = circosJS.parsePositionTextData;
                                this.renderDatumContainer = (function(_this) {
                                    return function(instance, parentElement, name, data, conf) {
                            Severity: Minor
                            Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                              Function renderDatum has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  this.renderDatum = function(parentElement, conf, layout, utils) {
                                      var tile;
                                      tile = parentElement.selectAll('.tile').data(function(d) {
                                          return d.values;
                                      }).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(utils.datumInnerRadius).outerRadius(utils.datumOuterRadius).startAngle(function(d) {
                              Severity: Minor
                              Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                Function ratioCalculate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    ratioCalculate(value, min, max, scope, reverse, logScale) {
                                        var fraction, scaleLogBase, x;
                                        scaleLogBase = logScale ? 2.3 : 1;
                                        if (
                                            min === max ||
                                Severity: Minor
                                Found in public/js/circos.js - About 1 hr to fix

                                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 constructor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    constructor(props) {
                                        super(props);
                                        // Properties below are internal state used to render results in small
                                        // slices (see updateState).
                                        this.numUpdates = 0;
                                Severity: Minor
                                Found in public/js/report.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language