Showing 12 of 18 total issues
Function addSorting
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
- 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 addSorting
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
Function SurveyView
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
const SurveyView: (Props: Props) => JSX.Element = ({
companyAuthToken,
displayedSurveyResponseId,
eventTraits,
onDismiss,
- 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 reducer
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const reducer = (state: State = INITIAL_STATE, action: Action) => {
switch (action.type) {
case 'DISMISS':
return {
...state,
Function init
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
Function App
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
const App = () => {
React.useEffect(() => {
Iterate.init({
apiKey: apiKey,
safeArea: useSafeAreaInsets,
File redux.tsx
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
import type { EdgeInsets } from './types';
import type {
EventTraits,
EventTraitsMap,
PresentationStyle,
Method initializeFlipper
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
Function Prompt
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const Prompt: (Props: Props) => JSX.Element = ({
dispatchShowSurvey,
onDismiss,
safeAreaInsets,
survey,
- 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 init
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
- 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 enableUI
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
Function setUserTraits
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const setUserTraits = (traits: UserTraits): SetUserTraits => {
const validTraits: UserTraitsContext = {};
Object.entries(traits).forEach(([key, value]) => {
switch (typeof value) {
case 'boolean':