Showing 334 of 1,376 total issues
Function selectedValues
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
selectedValues(newVal, oldVal) {
this.currentSelectedState = newVal;
if (!isEqual(oldVal, newVal)) {
this.$params = new URLSearchParams(window.location.search);
const currentComponents = Object.keys(newVal);
Function getInputEvents
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
getInputEvents({
onInput,
onBlur,
onFocus,
onKeyPress,
Function componentWillReceiveProps
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
checkPropChange(this.props.options, nextProps.options, () => {
const { showLoadMore, dataField } = nextProps;
if (showLoadMore) {
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="meetup_app"
credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="good-books-ds"
credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="meetup_app"
credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const results = parseHits(this.props.hits) || [];
const streamResults = parseHits(this.props.streamHits) || [];
let filteredResults = results;
Function defaultQuery
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
SingleDropdownList.defaultQuery = (value, props) => {
let query = null;
if (props.selectAllLabel && props.selectAllLabel === value) {
if (props.showMissing) {
query = { match_all: {} };
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="good-books-ds"
credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
Function Histogram
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Histogram = (props) => {
let max = props.stats[0].doc_count;
props.stats.forEach((item) => {
if (max < item.doc_count) {
max = item.doc_count;
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<Container class={this.$props.className}>
{this.$props.title && (
<Title class={getClassName(this.$props.innerClass, 'title')}>
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="carstore-dataset"
credentials="4HWI27QmA:58c731f7-79ab-4f55-a590-7e15c7e36721"
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="good-books-ds"
credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<Provider store={store}>
<ReactiveBase
app="good-books-ds"
Function render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { theme } = this.$props;
const renderSuggestions = this.$scopedSlots.suggestions;
return (
<Container class={this.$props.className}>
- 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 componentDidMount
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
componentDidMount() {
this.props.addComponent(this.internalComponent);
this.props.addComponent(this.props.componentId);
if (this.props.stream) {
- 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 mapStateToProps
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const mapStateToProps = (state, props) => {
let options
= state.aggregations[props.componentId]
&& state.aggregations[props.componentId][props.dataField];
let range = state.aggregations[`${props.componentId}__range__internal`];
- 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 selectItem
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
selectItem(item, isDefaultValue = false, props = this.$props) {
// ignore state updates when component is locked
if (props.beforeValueChange && this.locked) {
return;
}
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<Container style={this.props.style} className={this.props.className}>
{this.props.title && (
<Title className={getClassName(this.props.innerClass, 'title') || null}>
Function getCompositeAggsQuery
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getCompositeAggsQuery = (query, props, after) => {
const clonedQuery = { ...query };
// missing label not available in composite aggs
const {
dataField, size, sortBy, showMissing,