F

script\import_scripts\telligent.rb

All issues

Complex Code complexity = 152
Do not mix named captures and numbered captures in a Regexp literal. lines of code = 1
55
...%r{\shref=".*?/f/\d+(?:(/t/(?<topic_id>\d+))|(?:/p/\d+/(?<post_id>\d+))|(?:/p/(?<post_id>\d+)/reply))\.aspx[^"...
Perceived complexity for `fix_attachment_path` is too high. [15/8] lines of code = 1
739
  def fix_attachment_path(base_path, filename)
Perceived complexity for `raw_with_attachment` is too high. [12/8] lines of code = 1
657
  def raw_with_attachment(row, user_id, type)
Perceived complexity for `import_messages` is too high. [12/8] lines of code = 1
533
  def import_messages
Perceived complexity for `import_posts` is too high. [10/8] lines of code = 1
468
  def import_posts
Perceived complexity for `import_avatar` is too high. [10/8] lines of code = 1
199
  def import_avatar(user, avatar_url)
Class has too many lines. [721/100] lines of code = 1
41
class ImportScripts::Telligent < ImportScripts::Base
Use `==` if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. lines of code = 1
333
      if category_id = replace_with_category_id(child_categories, parent_category_id)
Use `==` if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. lines of code = 1
279
      if category_id = category_id_from_imported_category_id(c[:id])
Use `==` if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. lines of code = 1
230
    if banned_until = DateTime.parse(banned_until) > DateTime.now
Use `==` if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. lines of code = 1
204
    if match_data = avatar_url.match(LOCAL_AVATAR_REGEX)
Method has too many lines. [13/10] lines of code = 1
863
  def mark_topics_as_solved
Method has too many lines. [11/10] lines of code = 1
846
  def parse_properties(names, values)
Method has too many lines. [41/10] lines of code = 1
739
  def fix_attachment_path(base_path, filename)
Method has too many lines. [26/10] lines of code = 1
704
  def replace_embedded_attachments(row, user_id, type)
Method has too many lines. [25/10] lines of code = 1
657
  def raw_with_attachment(row, user_id, type)
Method has too many lines. [11/10] lines of code = 1
642
  def index_directory(root_directory)
Method has too many lines. [73/10] lines of code = 1
533
  def import_messages
Method has too many lines. [56/10] lines of code = 1
468
  def import_posts
Method has too many lines. [17/10] lines of code = 1
440
  def import_topic_views(topic, content_id)
Method has too many lines. [49/10] lines of code = 1
377
  def import_topics
Method has too many lines. [47/10] lines of code = 1
303
  def import_groups_and_forums_as_categories
Method has too many lines. [37/10] lines of code = 1
247
  def import_mapped_forums_as_categories
Method has too many lines. [23/10] lines of code = 1
199
  def import_avatar(user, avatar_url)
Method has too many lines. [62/10] lines of code = 1
125
  def import_users
Method has too many lines. [12/10] lines of code = 1
Assignment Branch Condition size for fix_attachment_path is too high. [<22, 46, 14> 52.88/17] lines of code = 1
739
  def fix_attachment_path(base_path, filename)
Assignment Branch Condition size for replace_embedded_attachments is too high. [<11, 23, 7> 26.44/17] lines of code = 1
704
  def replace_embedded_attachments(row, user_id, type)
Assignment Branch Condition size for raw_with_attachment is too high. [<9, 28, 11> 31.4/17] lines of code = 1
657
  def raw_with_attachment(row, user_id, type)
Assignment Branch Condition size for import_messages is too high. [<23, 37, 12> 45.19/17] lines of code = 1
533
  def import_messages
Assignment Branch Condition size for import_posts is too high. [<12, 30, 9> 33.54/17] lines of code = 1
468
  def import_posts
Assignment Branch Condition size for import_topics is too high. [<14, 45, 8> 47.8/17] lines of code = 1
377
  def import_topics
Assignment Branch Condition size for import_groups_and_forums_as_categories is too high. [<9, 31, 4> 32.53/17] lines of code = 1
303
  def import_groups_and_forums_as_categories
Assignment Branch Condition size for import_mapped_forums_as_categories is too high. [<17, 36, 8> 40.61/17] lines of code = 1
247
  def import_mapped_forums_as_categories
Assignment Branch Condition size for import_avatar is too high. [<2, 15, 8> 17.12/17] lines of code = 1
199
  def import_avatar(user, avatar_url)
Assignment Branch Condition size for import_users is too high. [<15, 34, 3> 37.28/17] lines of code = 1
125
  def import_users
Block has too many lines. [27/25] lines of code = 1
576
      create_posts(rows, total: total_count, offset: offset) do |row|
Block has too many lines. [52/25] lines of code = 1
547
    batches do |offset|
Block has too many lines. [46/25] lines of code = 1
479
    batches do |offset|
Block has too many lines. [26/25] lines of code = 1
402
      create_posts(rows, total: total_count, offset: offset) do |row|
Block has too many lines. [43/25] lines of code = 1
384
    batches do |offset|
Block has too many lines. [37/25] lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
87
    "0103" => ["0301".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
87
    "0103" => ["0301".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
87
    "0103" => ["0301".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
86
    "0003" => ["0300".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
86
    "0003" => ["0300".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
86
    "0003" => ["0300".to_i(16)].pack("U"),
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
85
    "B000" => "°",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
85
    "B000" => "°",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
84
    "1D20" => "”",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
84
    "1D20" => "”",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
83
    "1C20" => "“",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
83
    "1C20" => "“",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
82
    "F300" => "ó",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
82
    "F300" => "ó",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
81
    "E000" => "à",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
81
    "E000" => "à",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
80
    "E900" => "é",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
80
    "E900" => "é",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
79
    "1920" => "’",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
79
    "1920" => "’",
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
4
require "tiny_tds"
Prefer single-quoted strings when you don't need string interpolation or special symbols. lines of code = 1
3
require_relative "base"