Showing 646 of 1,897 total issues
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const syncLoaded = this.isLoaded;
const { bot, dispatch, getConfigValue } = this.props;
const landingPage = getConfigValue(StringSetting.landing_page);
return <div className="app">
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { dispatch } = this.props;
return <DesignerPanel panelName={"plant-selection"}
panelColor={PanelColor.lightGray}>
<DesignerPanelHeader
Function AxisActions
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const AxisActions = (props: AxisActionsProps) => {
const {
axis, arduinoBusy, locked, hardwareDisabled, botOnline,
dispatch, botPosition, sourceFwConfig,
} = props;
Function mapImagePositionData
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const mapImagePositionData = (props: MapImagePositionDataProps):
MapImagePositionData | undefined => {
const { cameraCalibrationData, alreadyRotated, noRotation } = props;
const imageRotated = alreadyRotated && !noRotation;
const parsed = parseCalibrationData(cameraCalibrationData);
Function hotkeysWithActions
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const hotkeysWithActions = (
navigate: (path: string) => void,
dispatch: Function,
slug: string,
) => {
Function CurveSvg
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const CurveSvg = (props: CurveSvgProps) => {
const { curve, dispatch, editable, hovered, setHovered } = props;
const { data } = curve.body;
const normX = normDay(data);
const normY = normValue(data);
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return <svg
id="rpi-gpio"
width="100%"
height="100%"
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const OuterWrapper = ({ children }: { children: React.ReactNode }) =>
globalConfig.ROLLBAR_CLIENT_TOKEN
? <RollbarProvider config={{
accessToken: globalConfig.ROLLBAR_CLIENT_TOKEN,
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { isEditing } = this.state;
const status = getArrayStatus(this.props.sensors);
const editButtonText = isEditing
? t("Back")
Function FarmEventRepeatForm
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FarmEventRepeatForm(props: FarmEventRepeatFormProps) {
const { disabled, fieldSet, repeat, endDate, endTime, timeUnit } = props;
return props.hidden
? <div className={"no-repeat-form"} />
: <div className="farm-event-repeat-form row">
Function ToolSlotInventoryItem
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ToolSlotInventoryItem = (props: ToolSlotInventoryItemProps) => {
const { x, y, z, id, tool_id, gantry_mounted } = props.toolSlot.body;
const toolName = props.tools
.filter(tool => tool.body.id == tool_id)[0]?.body.name;
const navigate = useNavigate();
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { group, dispatch, slugs } = this.props;
const { criteria } = group.body;
const commonProps = { group, criteria, dispatch };
const dayProps = {
Function mapStateToPropsAddEdit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function mapStateToPropsAddEdit(props: Everything): AddEditFarmEventProps {
const executableList: DropDownItem[] = [
{ label: t("Sequences"), heading: true, value: 0, headingId: "Sequence" },
...addExecutables(selectAllSequences(props.resources.index)),
{ label: t("Regimens"), heading: true, value: 0, headingId: "Regimen" },
Function IfBlockDropDownHandler
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const IfBlockDropDownHandler = (props: ThenElseParams) => {
const { dispatch, index, thenElseKey } = props;
const step = props.currentStep;
const sequence = props.currentSequence;
- 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
Method stale_data?
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def stale_data?
if resource
updated_at = raw_json[:updated_at]
if updated_at
if resource.updated_at.as_json != updated_at
- 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 getMode
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const getMode = (): Mode => {
if (store.getState().resources.consumers.farm_designer.profileOpen) {
return Mode.profile;
}
const panelSlug = Path.getSlug(Path.designer());
- 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 getAlignment
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function getAlignment(
activeXYZ: BotPosition | undefined,
plantXYZ: BotPosition,
swappedXY: Boolean,
): Alignment {
- 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 toolbaySlotAngle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const toolbaySlotAngle = (
pulloutDirection: ToolPulloutDirection,
quadrant: BotOriginQuadrant,
xySwap: boolean) => {
const rawAngle = () => {
- 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 semverCompare
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function semverCompare(left: string, right: string): SemverResult {
const leftSemVer = left.split("-")[0];
const rightSemVer = right.split("-")[0];
const leftHasSuffix = left.includes("-");
const rightHasSuffix = right.includes("-");
- 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 modifyConfig
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const modifyConfig = (config: Config, update: Partial<Config>) => {
const newConfig: Config = { ...config, ...update };
if (update.sizePreset) {
const presetConfig = PRESETS[update.sizePreset];
SIZE_CONFIG_KEYS.map(key => newConfig[key] = presetConfig[key] as never);
- 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"