Showing 7 of 13 total issues
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { subtitle, author } = this.props.data.site.siteMetadata
const post = this.props.data.markdownRemark
const tags = post.fields.tagSlugs
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const author = this.props.data
const links = {
telegram: author.telegram,
twitter: author.twitter,
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { location } = this.props
const {
author,
subtitle,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { title } = this.props.data.site.siteMetadata
const categories = this.props.data.allMarkdownRemark.group
return (
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
title,
date,
category,
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { title } = this.props.data.site.siteMetadata
const tags = this.props.data.allMarkdownRemark.group
return (
Function onCreateNode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions
if (node.internal.type === 'File') {
const parsedFilePath = path.parse(node.absolutePath)
- 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"