Showing 122 of 840 total issues
Function createLoginPanel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createLoginPanel() {
return <div className="login-panel">
<h3>ログイン</h3>
<div className="inputs">
<TextField
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="mail-address-setting setting">
<h3>メールアドレスの設定</h3>
<ul className="description">
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<MuiThemeProvider muiTheme={theme}>
<div className="root">
<div className="topbar">
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="welcome-view">
<div className="description">
Jijiへようこそ。<br/>
Function createEditor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createEditor() {
const selectedAgent = this.state.selectedAgent;
if (selectedAgent == null) return null;
const agentClass = this.props.model.getAgentClassForSelected();
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.state.enablePostmark !== false) return null;
return (
<div className="smtp-server-setting setting">
<h3>SMTPサーバーの設定</h3>
Method validate_stop_loss
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def validate_stop_loss(options, sell_or_buy)
price = options[:price]
stop_loss = options[:stopLossOnFill]
return if stop_loss.nil?
- 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 registerDragAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDragAction() {
this.verticalPointer.addEventListener("mousedown", (event) => {
this.slideXStart = this.chartModel.pointer.x
- event.stageX/devicePixelRatio;
event.nativeEvent.preventDefault();
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<span className="agent-source-editor-menu">
<IconButton
className="save-button"
Function createPageSelectorElement
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createPageSelectorElement(selector, index) {
if (selector.action) {
const className = selector.selected ? "selected" : "";
const palette = Theme.palette;
return (
Function createContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createContent() {
if (this.state.isLoading) {
return <div className="center-information">
<LoadingImage left={-20}/>
</div>;
Function createActionContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createActionContent() {
const prev = () => this.props.model.prev();
const next = () => this.props.model.next();
return <div className="actions">
<div className="left">
Function createDetailsView
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createDetailsView(notification) {
return <div className="notification-details">
<div className="top-panel">
<div className="avatar-panel">
{this.createAvatar(notification)}
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
this.updateEditorSize();
const errorElement = this.createErrorElement();
return (
<div className="agent-source-editor">
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
this.xhrManager = ContainerJS.Inject;
this.errorHandler = ContainerJS.Inject;
this.eventQueue = ContainerJS.Inject;
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(backtest, start_time, end_time,
interval_id, pairs, balance, orders, modules)
Method build_components
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_components(backtest, start_time, end_time,
interval_id, pairs, orders, positions, modules)
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(pair, timestamp, open, close = open,
high = open, low = open, volume = 0, close_timestamp = timestamp) #:nodoc:
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(pair, units, distance, broker,
index_graph = nil, bands_graph = nil, logger = nil,
calculator = BollingerBandsCalculator.new)
Method create_securities_configuration
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_securities_configuration(backtest,
start_time, end_time, interval_id, pairs, orders, positions, modules)