ServiceInnovationLab/serviceinnovationlab.github.io

View on GitHub

Showing 134 of 135 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

it 'can update and leave the content intact' do
author_name = @author_data.fetch('author', 'name')
expect(author_name).to eq 'aaron'
 
file_path = @author_data.create_file_path('author')
Severity: Major
Found in spec/_plugins/author_data_spec.rb and 1 other location - About 1 hr to fix
spec/_plugins/author_data_spec.rb on lines 149..161

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

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      it 'can update a file by referencing a file extension' do
      author_name = @author_data.fetch('author_with_content', 'name')
      expect(author_name).to eq 'burt'
       
      @author_data.update('author_with_content.md', 'name', 'brian')
      Severity: Major
      Found in spec/_plugins/author_data_spec.rb and 3 other locations - About 55 mins to fix
      spec/_plugins/author_data_spec.rb on lines 51..61
      spec/_plugins/author_data_spec.rb on lines 64..74
      spec/_plugins/author_data_spec.rb on lines 123..133

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      it 'can update a file by referencing a file extension' do
      author_name = @author_data.fetch('author', 'name')
      expect(author_name).to eq 'aaron'
       
      @author_data.update('author.md', 'name', 'brian')
      Severity: Major
      Found in spec/_plugins/author_data_spec.rb and 3 other locations - About 55 mins to fix
      spec/_plugins/author_data_spec.rb on lines 51..61
      spec/_plugins/author_data_spec.rb on lines 123..133
      spec/_plugins/author_data_spec.rb on lines 136..146

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      it 'can update a file without referencing a file extension' do
      author_name = @author_data.fetch('author_with_content', 'name')
      expect(author_name).to eq 'burt'
       
      @author_data.update('author_with_content', 'name', 'brian')
      Severity: Major
      Found in spec/_plugins/author_data_spec.rb and 3 other locations - About 55 mins to fix
      spec/_plugins/author_data_spec.rb on lines 51..61
      spec/_plugins/author_data_spec.rb on lines 64..74
      spec/_plugins/author_data_spec.rb on lines 136..146

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

      it 'can update a file without referencing a file extension' do
      author_name = @author_data.fetch('author', 'name')
      expect(author_name).to eq 'aaron'
       
      @author_data.update('author', 'name', 'brian')
      Severity: Major
      Found in spec/_plugins/author_data_spec.rb and 3 other locations - About 55 mins to fix
      spec/_plugins/author_data_spec.rb on lines 64..74
      spec/_plugins/author_data_spec.rb on lines 123..133
      spec/_plugins/author_data_spec.rb on lines 136..146

      TZInfo relative path traversal vulnerability allows loading of arbitrary files
      Open

      tzinfo (1.2.7)
      Severity: Critical
      Found in Gemfile.lock by bundler-audit

      XML round-trip vulnerability in REXML
      Open

      rexml (3.2.4)
      Severity: Critical
      Found in Gemfile.lock by bundler-audit

      Denial of service via header parsing in Rack
      Open

      rack (2.2.3)
      Severity: Minor
      Found in Gemfile.lock by bundler-audit

      Denial of service via multipart parsing in Rack
      Open

      rack (2.2.3)
      Severity: Minor
      Found in Gemfile.lock by bundler-audit

      Denial of Service Vulnerability in Rack Content-Disposition parsing
      Open

      rack (2.2.3)
      Severity: Minor
      Found in Gemfile.lock by bundler-audit

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      $('.menu-btn-styleguide, .sliding-panel-close-styleguide').on(
      'click touchstart',
      function(e) {
      $('.nav-mobile-styleguide').toggleClass('is-visible');
      e.preventDefault();
      Severity: Minor
      Found in assets/js/index.js and 1 other location - About 50 mins to fix
      assets/js/index.js on lines 14..20

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      $('.menu-btn, .overlay, .sliding-panel-close').on(
      'click touchstart',
      function(e) {
      $('.nav-mobile, .overlay').toggleClass('is-visible');
      e.preventDefault();
      Severity: Minor
      Found in assets/js/index.js and 1 other location - About 50 mins to fix
      assets/js/index.js on lines 23..29

      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

      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

      Block has too many lines. [29/25]
      Open

      image_directory.map do |image|
      img_array = image.split('/')
      img_relative = "../#{img_array[1...img_array.length].join('/')}"
       
      ignored_items = [] || File.readlines(skipped_images_file)
      Severity: Minor
      Found in check_images.rb by rubocop
      Severity
      Category
      Status
      Source
      Language