ServiceInnovationLab/serviceinnovationlab.github.io

View on GitHub

Showing 15 of 135 total issues

File waypoints.min.js has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Generated by CoffeeScript 1.6.2
/*
jQuery Waypoints - v2.0.3
Copyright (c) 2011-2013 Caleb Troughton
Dual licensed under the MIT license and GPL license.
Severity: Minor
Found in assets/js/waypoints.min.js - About 7 hrs to fix

    Method related_posts has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def related_posts(me, posts)
    return [] unless posts.docs.size > 1
     
    highest_freq = @tag_freq.values.max
    related_scores = Hash.new(0)
    Severity: Minor
    Found in _plugins/related_posts.rb - About 3 hrs to fix

    Function refresh has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    t.prototype.refresh = function() {
    var t,
    e,
    r,
    i = this;
    Severity: Major
    Found in assets/js/waypoints.min.js - About 2 hrs to fix

      Function doScroll has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      t.prototype.doScroll = function() {
      var t,
      e = this;
      t = {
      horizontal: {
      Severity: Minor
      Found in assets/js/waypoints.min.js - About 1 hr to fix

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

        function t(t) {
        var e = this;
        this.$element = t;
        this.element = t[0];
        this.didResize = false;
        Severity: Minor
        Found in assets/js/waypoints.min.js - About 1 hr to fix

          Method related_posts has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def related_posts(me, posts)
          return [] unless posts.docs.size > 1
           
          highest_freq = @tag_freq.values.max
          related_scores = Hash.new(0)
          Severity: Minor
          Found in _plugins/related_posts.rb - About 1 hr to fix

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

            module.exports = function($el) {
            var data = $el.data(),
            key,
            validatorName,
            validatorPattern,
            Severity: Minor
            Found in _sass/_libs/wds/js/components/validator.js - About 1 hr to fix

            Function t has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function t(t, e, r) {
            var i, o;
            r = n.extend({}, n.fn[g].defaults, r);
            if (r.offset === 'bottom-in-view') {
            r.offset = function() {
            Severity: Minor
            Found in assets/js/waypoints.min.js - About 1 hr to fix

              Method find_published_authors has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

              def find_published_authors
              published_authors = []
              @site_post_paths.each do |post_path|
              next unless File.exist? File.join(Dir.pwd, '_posts', post_path)
               
               
              Severity: Minor
              Found in _plugins/author_data.rb - About 55 mins to fix

              Method team_photo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              def team_photo(name)
              if Jekyll.sites[0].config['env'] != 'development'
              baseurl = Jekyll.sites[0].config['baseurl']
              default = "<img class='img-circle team-img bio-clip' " \
              "src='#{baseurl}/assets/img/SIL-Logo-Animation.gif' alt='SIL logo'>"
              Severity: Minor
              Found in _plugins/team.rb - About 45 mins to fix

              Method team_link has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              def team_link(input)
              authors = Jekyll.sites[0].collections['authors'].docs
              index = authors.find_index do |x|
              if x.data['name'].nil?
              puts "No such author: #{input} in #{x}"
              Severity: Minor
              Found in _plugins/author.rb - About 45 mins to fix

              Method in_groups has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              def in_groups(number, fill_with = nil)
              # size.div number gives minor group size;
              # size % number gives how many objects need extra accommodation;
              # each group hold either division or division + 1 items.
              division = size.div number
              Severity: Minor
              Found in _plugins/utility.rb - About 45 mins to fix

              Consider simplifying this complex logical expression.
              Open

              if url.is_a? Array
              urls = url.map do |u|
              page_url = clip_char(page_url.to_s.downcase, '/').split('/')[0]
              u = clip_char(u.to_s.downcase, '/').split('/')[0]
              # if the url group is 'blog', match date strings
              Severity: Major
              Found in _plugins/utility.rb - About 40 mins to fix

                Avoid too many return statements within this function.
                Open

                return n.error(
                'The ' + r + ' method does not exist in jQuery Waypoints.',
                );
                Severity: Major
                Found in assets/js/waypoints.min.js - About 30 mins to fix

                  Method tag_freq has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def tag_freq(posts)
                  @tag_freq = Hash.new(0)
                  posts.docs.each do |post|
                  post.data['categories'].each { |category| @tag_freq[category] += 1 } if @use_categories
                  post.data['tags'].each { |tag| @tag_freq[tag] += 1 } if @use_tags
                  Severity: Minor
                  Found in _plugins/related_posts.rb - About 25 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language