Showing 445 of 2,739 total issues
Function Google
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Google = props => {
const { className, style } = props;
return (
<svg
className={className}
File modal-11.spec.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const PageModal = require('../../../src/components/Modal/pageObject');
const PageLookup = require('../../../src/components/Lookup/pageObject');
const PageDatePicker = require('../../../src/components/DatePicker/pageObject');
const PageTimePicker = require('../../../src/components/TimePicker/pageObject');
const { ESCAPE_KEY, ENTER_KEY, ARROW_DOWN_KEY } = require('../../constants');
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
className,
style,
value,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
className,
style,
label,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
className,
style,
value,
Function Application
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Application = props => {
const { className, style } = props;
return (
<svg
className={className}
Function Examples
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Examples(_ref1, _ref2) {
const { examples, name, exampleMode } = _ref1;
const codeRevision = _ref2.codeRevision;
if (name === 'Customization') {
Function ButtonMenuExample
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ButtonMenuExample() {
return (
<div>
<ButtonMenu
className="rainbow-m-horizontal_medium"
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
style,
className,
onChange,
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { isFocused, tabIndex, onFocus, value, onClick } = this.props;
if (isFocused) {
return (
Function StatsCard
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function StatsCard(props) {
const { validRecords, invalidRecords, borderRadius } = props;
const invalidCount = invalidRecords.length;
const validCount = validRecords.length;
const totalRecords = invalidCount + validCount;
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
data,
columns,
rows,
Function PhoneSolid
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PhoneSolid = props => {
const { className, style } = props;
return (
<svg
className={className}
Function Internationalization
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Internationalization = props => {
const { className } = props;
return (
<svg
className={className}
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { selectedItem } = this.state;
return (
<Application theme={theme}>
<ReactTypeformEmbed
Function UserFirstPost
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function UserFirstPost(props) {
const { className, style } = props;
return (
<svg
className={className}
Function Icon
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function Icon({ files, error, isDragOver, value, uploadIcon }) {
if (value !== null) {
if (!isDragOver) {
if (error) {
return <ErrorIcon />;
- 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 render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
name,
value,
onChange,
Function Header
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Header() {
return (
<header className="rainbow-flex rainbow-align_center rainbow-p-vertical_small rainbow-p-horizontal_large rainbow-admin_header rainbow-background-color_white">
<img
src="./assets/images/rainbow-logo.svg"
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
style,
className,
label,