app/controllers/setup/oauth_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Method has too many lines. [11/10]
Open

  def create
    if current_program.oauth_client_id && current_program.oauth_client_secret
      flash[:success] = "DHIS2 log-in already enabled for #{current_project.name}"
      redirect_to setup_project_path(current_project)
      return

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Line is too long. [109/100]
Open

    flash[:failure] = "An error occured during set-up for DHIS2 log-in: #{e.class.name} #{e.message[0..100]}"

Use nested module/class definitions instead of compact style.
Open

class Setup::OauthController < PrivateController

This cop checks the style of children definitions at classes and modules. Basically there are two different styles:

Example: EnforcedStyle: nested (default)

# good
# have each child on its own line
class Foo
  class Bar
  end
end

Example: EnforcedStyle: compact

# good
# combine definitions as much as possible
class Foo::Bar
end

The compact style is only forced for classes/modules with one child.

Trailing whitespace detected.
Open

  

This cop looks for trailing whitespace in the source code.

Example:

# The line in this example contains spaces after the 0.
# bad
x = 0

# The line in this example ends directly after the 0.
# good
x = 0

Final newline missing.
Open

end

This cop looks for trailing blank lines and a final newline in the source code.

Example: EnforcedStyle: finalblankline

# `final_blank_line` looks for one blank line followed by a new line
# at the end of files.

# bad
class Foo; end
# EOF

# bad
class Foo; end # EOF

# good
class Foo; end

# EOF

Example: EnforcedStyle: final_newline (default)

# `final_newline` looks for one newline at the end of files.

# bad
class Foo; end

# EOF

# bad
class Foo; end # EOF

# good
class Foo; end
# EOF

There are no issues that match your filters.

Category
Status