fyntech/fyntech

View on GitHub

Showing 219 of 219 total issues

Final newline missing.
Open

end
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

                Jekyll.logger.warn("Warning:", "The MeetupApi failed for \"#{group}\" retrying #{retries} times before giving up… Sleeping for #{sleepTimeout} seconds")
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Use snake_case for variable names.
Open

        maxRetryTimeout = 50
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Tab detected.
Open

        convertedDate = "#{DateTime.strptime(dateWithOffset.to_s,'%Q').strftime('%Y-%m-%d %H:%M:%S')} #{@@timezone}"
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

    def getMeetUpGroupEvents(group)
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

          keyPath = "#{@site.source}/meetup_api_key"
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Non-local exit from iterator, without return value. next, break, Array#find, Array#any?, etc. is preferred.
Open

          config.api_key = ENV['MEETUP_API_KEY'] || File.file?(keyPath) && File.read(keyPath) || return
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

This cop checks for non-local exits from iterators without a return value. It registers an offense under these conditions:

  • No value is returned,
  • the block is preceded by a method chain,
  • the block has arguments,
  • the method which receives the block is not define_method or define_singleton_method,
  • the return is not contained in an inner scope, e.g. a lambda or a method definition.

Example:

class ItemApi
  rescue_from ValidationError do |e| # non-iteration block with arg
    return { message: 'validation error' } unless e.errors # allowed
    error_array = e.errors.map do |error| # block with method chain
      return if error.suppress? # warned
      return "#{error.param}: invalid" unless error.message # allowed
      "#{error.param}: #{error.message}"
    end
    { message: 'validation error', errors: error_array }
  end

  def update_items
    transaction do # block without arguments
      return unless update_necessary? # allowed
      find_each do |item| # block without method chain
        return if item.stock == 0 # false-negative...
        item.update!(foobar: true)
      end
    end
  end
end

Space missing after comma.
Open

        doc.data['dateStart'] = convertDate(event['time'],event['utc_offset'])
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Tab detected.
Open

    def generateEventDocument(event)
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

        if event['duration']
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

                @collection.docs << doc
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

            end
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Use snake_case for method names.
Open

    def convertDate(date, offset)
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use 2 (not 1) spaces for indentation.
Open

                Jekyll.logger.error("Error:", "No more retries left, we're going down 💥")
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Space missing after comma.
Open

            doc.data['dateEnd'] = convertDate(event['time']+event['duration'],event['utc_offset'])
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Tab detected.
Open

                retry
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

        doc = Jekyll::Document.new('', :site => @site, :collection => @collection)
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop

Tab detected.
Open

        doc.data['category'] = event['group']['name'].downcase.gsub(/\s+|[():]/, "")
Severity: Minor
Found in _plugins/meetupFetcher.rb by rubocop
Severity
Category
Status
Source
Language