backend/app/controllers/graphql_controller.rb
Method has too many lines. [17/10] Open
Open
def execute
variables = ensure_hash(params[:variables])
query = params[:query]
operation_name = params[:operationName]
context = {
- Read upRead up
- 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.
Assignment Branch Condition size for execute is too high. [16.28/15] Open
Open
def execute
variables = ensure_hash(params[:variables])
query = params[:query]
operation_name = params[:operationName]
context = {
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Trailing whitespace detected. Open
Open
context: context,
- Exclude checks
Trailing whitespace detected. Open
Open
},
- Exclude checks
Trailing whitespace detected. Open
Open
variables: variables,
- Exclude checks
Trailing whitespace detected. Open
Open
backtrace: error.backtrace
- Exclude checks
Trailing whitespace detected. Open
Open
render json: {
- Exclude checks
Trailing whitespace detected. Open
Open
message: error.message,
- Exclude checks
Trailing whitespace detected. Open
Open
query,
- Exclude checks
Trailing whitespace detected. Open
Open
error: {
- Exclude checks
Trailing whitespace detected. Open
Open
data: {}
- Exclude checks
Avoid comma after the last item of a hash. Open
Open
login: method(:sign_in),
- Read upRead up
- Exclude checks
This cop checks for trailing comma in array and hash literals.
Example: EnforcedStyleForMultiline: consistent_comma
# bad
a = [1, 2,]
# good
a = [
1, 2,
3,
]
# good
a = [
1,
2,
]
Example: EnforcedStyleForMultiline: comma
# bad
a = [1, 2,]
# good
a = [
1,
2,
]
Example: EnforcedStyleForMultiline: no_comma (default)
# bad
a = [1, 2,]
# good
a = [
1,
2
]