Showing 81 of 198 total issues
File language.js
has 941 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default {
universal: {
analysis: {
filter: {
universal_stop: {
File language.js
has 941 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default {
universal: {
analysis: {
filter: {
universal_stop: {
Function render
has 420 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
stars,
showModal,
url,
File ConnectApp.js
has 712 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Form, Button, Alert, AutoComplete, Input, Modal } from 'antd';
Function render
has 312 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
appname,
url,
pastApps,
File App.js
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component } from 'react';
import {
GithubButton,
Function handleFetchMappings
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function* handleFetchMappings() {
const defaultError = 'Unable to get mappings';
const defaultErrorDescription = 'Please add mappings';
try {
yield put(clearError());
Function render
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { indexTypeMap, typePropertyMapping, version } = this.props;
const {
addDataError,
documentId,
File ExportData.js
has 456 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component, Fragment } from 'react';
import { DownloadOutlined } from '@ant-design/icons';
import { Modal, Button, Spin, Alert, Row, Col, Select, Checkbox } from 'antd';
import { connect } from 'react-redux';
Function render
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { data, isShowingModal, isSavingData } = this.state;
const {
columns,
mappings,
Function render
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
isShowingModal,
isDownloading,
error,
Function render
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { indexTypeMap, version } = this.props;
const {
addColumnError,
addColumnField,
Function render
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
reactiveListKey,
sortField,
sortOrder,
Function render
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
mappings,
appname,
sortField,
File MultipleUpdate.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component, Fragment } from 'react';
import { Modal, Select, Button } from 'antd';
import { CloseOutlined, PlusOutlined, EditOutlined } from '@ant-design/icons';
File AddFieldModal.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component, Fragment } from 'react';
import { Modal, Input, Select, Radio, Row, Col, Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
File AddRowModal.js
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @flow
import React, { Component, Fragment } from 'react';
import { Modal, Input, Select, Row, Col, Button, Tabs } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
url: rawUrl,
isLoading,
mappings,
Function componentDidMount
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
componentDidMount() {
// sync state from url
let appname = '';
let url = '';
const { mode, isConnected, isHidden, forceReconnect } = this.props;
- 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
File mappings.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { dateFormatMap } from './date';