Showing 122 of 840 total issues
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="setting-finished-view">
<h3>完了</h3>
<div className="description">
ValidationFunctions
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
export default class ValidationFunctions {
static notNull( value, restriction ) {
if ( value === null || value === undefined || value === "" ) {
return {type : "NOT_NULL"};
Pointer
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
export default class Pointer extends Observable {
constructor(coordinateCalculator, candleSticks, graphs) {
super();
this.coordinateCalculator = coordinateCalculator;
Class ClosingPolicy
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class ClosingPolicy
include Mongoid::Document
include Jiji::Errors
include Jiji::Utils::ValueObject
Class AbstractBroker
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class AbstractBroker
include Jiji::Model::Trading
attr_reader :positions #:nodoc:
AgentSourceEditor
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
export default class AgentSourceEditor extends Observable {
constructor() {
super();
this.agentSources = ContainerJS.Inject;
Method from_h
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def from_h(hash)
hash.each do |k, v|
k = k.to_sym
unless v.nil?
if k == :price || k == :price_bound || k == :initial_price
- 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
File trading_summary.rb
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'encase'
module Jiji::Model::Trading::TradingSummaries
class CompositeSummary
def initialize(name = nil)
File signals.rb
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Signals
# 一定期間のレートデータを元に値を算出するシグナルの基底クラス
class RangeSignal
include Signals
Function viewModel
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewModel(binder) {
binder.bind("application").to("viewmodel.Application");
binder.bind("navigator").to("viewmodel.Navigator");
binder.bind("homePageModel")
Method update_from_order_options
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def update_from_order_options(options, price) #:nodoc:
if options.include?(:stopLoss)
self.stop_loss = !options[:stopLoss].nil? ? \
ClosingPolicy.extract_stop_loss_from_order(options[:stopLoss], price) : 0
end
- 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
render() {
return (
<div className="smtp-server-setting-view">
<h3>SMTPサーバーの設定</h3>
<div className="description">
Function createPasswordChanger
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
createPasswordChanger() {
return <div>
<div className="passwords">
<TextField
ref="newPassword1"
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const securitiesSelector = this.creattSecuritiesSelector();
const activeSecuritiesConfigurator = this.createConfigurator();
return (
<div className="securities-setting-view">
Function createInputFields
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
createInputFields() {
return <div className="inputs">
<div className="host-and-port">
<div className="host">
<TextField
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const labelForAll = <span>
すべての建玉をダウンロードする<br/>
<span className="info">
※建玉が多いと時間がかかる場合があります。ご注意ください。
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const actions = [
<FlatButton
label="キャンセル"
primary={false}
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const securitiesSelector = this.creattSecuritiesSelector();
const activeSecuritiesConfigurator = this.createConfigurator();
return (
<div className="securities-setting setting">
Function calculateHighAndLow
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
calculateHighAndLow(allValues) {
const initialValue =
allValues.length > 0 && allValues[0].values.length > 0
? allValues[0].values[0] : 0;
const result = allValues.reduce((r, values) => {
- 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 onPropertyChanged
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
onPropertyChanged(name, event) {
this.initPointer();
if (this.chartModel.pointer.time
&& (this.chartModel.pointer.price || this.chartModel.pointer.balance)) {
this.show();
- 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"