Showing 2,441 of 6,157 total issues
Function DownloadScreenshot
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function DownloadScreenshot({
text,
logEvent,
dashboardId,
format,
- 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 extractQueryFields
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function extractQueryFields(
formData: FormDataResidual,
aliases?: QueryFieldAliases,
): QueryFields {
const queryFieldAliases: QueryFieldAliases = {
- 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 renderChart
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
renderChart(width: number, height: number) {
const {
id,
className,
chartType,
- 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 normalizeTimeColumn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function normalizeTimeColumn(
formData: QueryFormData,
queryObject: QueryObject,
): QueryObject {
// The formData should be "raw form_data" -- the snake_case version of formData rather than camelCase.
- 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 getComparisonFilters
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const getComparisonFilters = (
formData: QueryFormData,
extraFormData: any,
): AdhocFilter[] => {
const timeFilterIndex: number =
- 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 main
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def main(
Function get_docker_command
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_docker_command(
Function get_time_filter
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_time_filter( # pylint: disable=too-many-arguments
Function get_samples
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_samples( # pylint: disable=too-many-arguments
Function select_star
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def select_star( # pylint: disable=too-many-arguments
Function filter_values_handler
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def filter_values_handler( # pylint: disable=too-many-arguments
Function compare
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def compare( # pylint: disable=too-many-arguments
Function log_with_context
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_with_context( # pylint: disable=too-many-locals,too-many-arguments
Function compute_and_cache
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def compute_and_cache( # pylint: disable=too-many-arguments
Function _partition_query
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _partition_query( # pylint: disable=too-many-arguments,too-many-locals,unused-argument
Function set_query_result
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_query_result(
Function _partition_query
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _partition_query( # pylint: disable=too-many-arguments
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__( # pylint: disable=too-many-arguments
Function load_configs
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_configs(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(