Showing 85 of 1,494 total issues
Function ActionDrawer
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
const ActionDrawer = ({
org,
selectedHeaderId,
base,
staticFile,
- 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 computeCompletions
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
export const computeCompletions = (todoKeywords, tagNames, allProperties) => (
filterExpr,
filterString,
curserPosition
) => {
- 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
OrgFile
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
class OrgFile extends PureComponent {
constructor(props) {
super(props);
_.bindAll(this, [
Function parseRawText
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
export const parseRawText = (rawText, { excludeContentElements = false } = {}) => {
const lines = rawText.split('\n');
const LIST_HEADER_REGEX = /^\s*([-+*]|(\d+(\.|\)))) (.*)/;
- 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
Header
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class Header extends PureComponent {
SWIPE_ACTION_ACTIVATION_DISTANCE = 80;
FREE_DRAG_ACTIVATION_DISTANCE = 10;
constructor(props) {
Function AttributedString
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const AttributedString = ({ org, parts, subPartDataAndHandlers }) => {
let className;
let location = useLocation();
- 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 setSearchFilterInformation
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const setSearchFilterInformation = (state, action) => {
const { searchFilter, cursorPosition, context } = action;
let files = state.get('files');
state = state.asMutable();
- 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
TableEditorModal
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class TableEditorModal extends PureComponent {
constructor(props) {
super(props);
_.bindAll(this, [
'handleCellSelect',
Function constructor
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
constructor(props) {
super(props);
runAllMigrations();
- 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 parseMarkupAndCookies
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export const parseMarkupAndCookies = (rawText, { shouldAppendNewline = false } = {}) => {
const matches = [];
let match = markupAndCookieRegex.exec(rawText);
while (match) {
if (!!match[2]) {
- 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 timeFilter
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export const timeFilter = (filterDescription) => {
const timeFilterDescription = filterDescription.field.timerange;
let lower;
let upper;
if (timeFilterDescription.type === 'point') {
- 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
HeaderContent
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class HeaderContent extends PureComponent {
constructor(props) {
super(props);
_.bindAll(this, [
Function loadContentFromLocalStorage
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const loadContentFromLocalStorage = (initialState) => {
persistableFields.forEach((field) => {
let value = localStorage.getItem(field.name);
if (field.type === 'nullable') {
- 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 subscribeToChanges
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export const subscribeToChanges = (store) => {
if (!localStorageAvailable) {
return () => {};
} else {
return () => {
- 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
HeaderBar
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class HeaderBar extends PureComponent {
constructor(props) {
super(props);
_.bindAll(this, [
TimestampEditor
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class TimestampEditor extends PureComponent {
constructor(props) {
super(props);
_.bindAll(this, [
Function createRawDescriptionText
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export const createRawDescriptionText = (header, includeTitle, dontIndent) => {
// To simplify access to properties:
const immutableHeader = header;
header = header.toJS();
- 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 pathAndPartOfListItemWithIdInAttributedString
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const pathAndPartOfListItemWithIdInAttributedString = (parts, listItemId) =>
parts
.map((part, partIndex) => {
if (part.get('type') === 'list') {
return part
- 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 determineIncludedFiles
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const determineIncludedFiles = (files, fileSettings, path, settingValue, includeByDefault) =>
files.mapEntries(([filePath, file]) => [
filePath,
file.update('headers', (headers) => {
const fileSetting = fileSettings.find((setting) => filePath === setting.get('path'));
- 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 componentDidUpdate
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
subPartDataAndHandlers: {
onListTitleValueUpdate,
onListContentsValueUpdate,
- 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"