CLOSER-Cohorts/archivist

View on GitHub

Showing 2,591 of 2,591 total issues

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import auth from './reducers/auth';
Severity: Minor
Found in react/src/reducer.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export const HumanizeObjectType = (type) => {

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export const FileToBase64 = (file) => {
Severity: Minor
Found in react/src/support/FileToBase64.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export const ConstructTypeFromObjectType = (type) => {

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { combineReducers } from "redux";
Severity: Minor
Found in react/src/reducers/index.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export const ObjectColour = (type) => {
Severity: Minor
Found in react/src/support/ObjectColour.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export function register(config) {
Severity: Minor
Found in react/src/serviceWorker.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

export default convertToHHMM;
Severity: Minor
Found in react/src/support/time.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { include } from 'named-urls'
Severity: Minor
Found in react/src/routes.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import { merge, isObject } from 'lodash';

For more information visit Source: http://eslint.org/docs/rules/

Use Kernel#loop with break rather than begin/end/until(or while).
Open

    end while iterator.to_i != 0
Severity: Minor
Found in app/models/redis_record.rb by rubocop

This cop checks for uses of begin...end while/until something.

Example:

# bad

# using while
begin
  do_something
end while some_condition

Example:

# bad

# using until
begin
  do_something
end until some_condition

Example:

# good

# using while
while some_condition
  do_something
end

Example:

# good

# using until
until some_condition
  do_something
end

Unused block argument - code_list_id. If it's necessary, use _ or _code_list_id as an argument name to indicate that it won't be used.
Open

json.array! @object.response_domain_codes.group_by(&:code_list_id) do | code_list_id, rds|

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Unused method argument - resource. If it's necessary, use _ or _resource as an argument name to indicate that it won't be used. You can also write as after_confirmation_path_for(*) if you want the method to accept any arguments but don't care about them.
Open

  def after_confirmation_path_for(resource_name, resource)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Useless assignment to variable - qis.
Open

    qis = i.db_question_items
Severity: Minor
Found in lib/tasks/time.rake by rubocop

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Useless assignment to variable - ccs.
Open

    ccs = {}
Severity: Minor
Found in app/models/instrument.rb by rubocop

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Unused method argument - resource_name. If it's necessary, use _ or _resource_name as an argument name to indicate that it won't be used. You can also write as after_confirmation_path_for(*) if you want the method to accept any arguments but don't care about them.
Open

  def after_confirmation_path_for(resource_name, resource)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Useless assignment to variable - qis.
Open

    qis = i.ro_question_items
Severity: Minor
Found in lib/tasks/time.rake by rubocop

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Unused block argument - i. If it's necessary, use _ or _i as an argument name to indicate that it won't be used.
Open

    variables = variables.group_by{|v| v['id']}.map do | i, grouped_variables |

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Unreachable code detected.
Open

    raise Pundit::NotAuthorizedError, "must be logged in" unless user
Severity: Minor
Found in app/policies/application_policy.rb by rubocop

This cop checks for unreachable code. The check are based on the presence of flow of control statement in non-final position in begin(implicit) blocks.

Example:

# bad

def some_method
  return
  do_something
end

# bad

def some_method
  if cond
    return
  else
    return
  end
  do_something
end

Example:

# good

def some_method
  do_something
end

Unused block argument - index. If it's necessary, use _ or _index as an argument name to indicate that it won't be used.
Open

      new_rds.each_with_index do |new_rd, index|
Severity: Minor
Found in lib/question.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end
Severity
Category
Status
Source
Language