app/models/control_construct.rb
Method has too many lines. [36/30] Open
Open
def no_circular_references
if parent_id.present?
sql = <<-SQL
WITH RECURSIVE ancestry_check AS (
SELECT
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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.
Method no_circular_references
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def no_circular_references
if parent_id.present?
sql = <<-SQL
WITH RECURSIVE ancestry_check AS (
SELECT
- Create a ticketCreate a ticket
Method find_nearest_parent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def find_nearest_parent(target_class)
columns = ['id', 'parent_id', 'construct_id', 'construct_type']
columns_joined = columns.join(',')
sql =
<<-SQL
- Create a ticketCreate a ticket