Showing 112 of 407 total issues
Function pageBugsMutableReadyHandler
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function pageBugsMutableReadyHandler () {
$('#add_id_product').click(function () {
return showRelatedObjectPopup(this)
})
Function preProcessData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preProcessData (data, callbackF) {
const runIds = []
const productIds = []
data.forEach(function (element) {
runIds.push(element.id)
Function pageTestplansMutableReadyHandler
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function pageTestplansMutableReadyHandler () {
if ($('#id_version').find('option').length === 0) {
populateVersion()
}
Function ajax
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
ajax: function (data, callbackF, settings) {
const params = {}
if ($('#id_name').val()) {
params.name__icontains = $('#id_name').val()
Function create_permissions
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def create_permissions(
app_config,
verbosity=2,
interactive=True,
using=DEFAULT_DB_ALIAS,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function filterTestExecutionsByProperty
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function filterTestExecutionsByProperty (runId, executions, filterBy, filterValue) {
// no input => show all rows
if (filterValue.trim().length === 0) {
$('.test-execution-element').show()
return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function visit_call
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def visit_call(self, node):
if node.func.as_string().endswith("Field") and node.keywords:
for keyword in node.keywords:
if keyword.arg == "label":
self.add_message("form-field-label-used", node=node)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function drawTable
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function drawTable () {
$('.js-spinner').show()
if (table) {
table.destroy()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parse_translation_string
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def parse_translation_string(self, filename, lines):
startline = 0
startcol = 0
blocktrans_string = ""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function advancedSearchAndAddTestCases
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function advancedSearchAndAddTestCases (objId, rpcMethod, href, errorMessage) {
window.addTestCases = function (testCaseIDs, sender) {
let rpcErrors = 0
// close the popup
Function filterTestExecutionsByProperty
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function filterTestExecutionsByProperty (runId, executions, filterBy, filterValue) {
// no input => show all rows
if (filterValue.trim().length === 0) {
$('.test-execution-element').show()
return
Function renderTestExecutionRow
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderTestExecutionRow (testExecution) {
// refresh the internal data structure b/c some fields are used
// to render the expand area and may have changed via bulk-update meanwhile
testExecution.status__name = $('#test_run_pk').data(`trans-execution-status-${testExecution.status}`)
allExecutions[testExecution.id] = testExecution
Function jsonRPC
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function jsonRPC (rpcMethod, rpcParams, callback, isSync) {
// .filter() args are passed as dictionary but other args,
// e.g. for .add_tag() are passed as a list of positional values
if (!Array.isArray(rpcParams)) {
rpcParams = [rpcParams]
Function clone
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def clone( # pylint: disable=too-many-arguments
Function mailto
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def mailto( # pylint: disable=invalid-name
template_name,
subject,
recipients=None,
context=None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _url_view_mapping
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _url_view_mapping(cls, root_urlpatterns):
def flatten(urlpatterns, prefix="^", result=None):
"""
Flattens the url graph
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function testPlanAutoComplete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function testPlanAutoComplete (selector, planCache) {
$(`${selector}.typeahead`).typeahead({
minLength: 1,
highlight: true
}, {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function create_permissions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_permissions(
Function create_execution
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_execution( # pylint: disable=too-many-arguments
Function post
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def post(self, request):
if not self._is_request_data_valid(request):
return HttpResponseRedirect(request.META.get("HTTP_REFERER", "/"))
# Do the clone action
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"