unageanu/jiji2

View on GitHub

Showing 840 of 840 total issues

File trap_repeat_if_done_spec.rb has 599 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'sample_agent_test_configuration'

describe TrapRepeatIfDone do
  include_context 'use agent_setting'

Severity: Major
Found in sample_agents/spec/trap_repeat_if_done_spec.rb - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

              <div className="item">
                <div className="title">建玉の保有期間</div>
                <div className="details">
                  <div className="item">
                    <div className="label">最長</div>
    sites/src/js/view/components/trading-summary/trading-summary-view.js on lines 126..148

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 239.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

              <div className="item">
                <div className="title">取引数量</div>
                <div className="details">
                  <div className="item">
                    <div className="label">最大</div>
    sites/src/js/view/components/trading-summary/trading-summary-view.js on lines 103..125

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 239.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      render() {
        return (
          <DropDownMenu
            className="interval-selector"
            value={this.state.selected}
    Severity: Major
    Found in sites/src/js/view/components/chart/interval-selector.js and 1 other location - About 1 day to fix
    sites/src/js/view/components/chart/pair-selector.js on lines 50..72

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 216.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      render() {
        return (
          <DropDownMenu
            className="pair-selector"
            value={this.state.selected}
    Severity: Major
    Found in sites/src/js/view/components/chart/pair-selector.js and 1 other location - About 1 day to fix
    sites/src/js/view/components/chart/interval-selector.js on lines 24..46

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 216.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Class has too many lines. [110/100]
    Open

      class PositionBuilder
    
        include Jiji::Model::Trading
        include Jiji::Model::Trading::Utils
    
    

    This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Block has too many lines. [122/25]
    Open

    describe StatisticalArbitrage::Position do
      include_context 'utils for statistical arbitrage'
    
      before(:example) do
        @broker = double('mock broker')

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    json Gem for Ruby Unsafe Object Creation Vulnerability (additional fix)
    Open

        json (2.1.0)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2020-10663

    Criticality: High

    URL: https://www.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663/

    Solution: upgrade to >= 2.3.0

    httparty has multipart/form-data request tampering vulnerability
    Open

        httparty (0.16.3)
    Severity: Minor
    Found in Gemfile.lock by bundler-audit

    Advisory:

    Criticality: Medium

    URL: https://github.com/jnunemaker/httparty/security/advisories/GHSA-5pq7-52mg-hr42

    Solution: upgrade to >= 0.21.0

    JMESPath for Ruby using JSON.load instead of JSON.parse
    Open

        jmespath (1.4.0)
    Severity: Minor
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2022-32511

    Criticality: Critical

    URL: https://github.com/jmespath/jmespath.rb/pull/55

    Solution: upgrade to >= 1.6.1

    Percent-encoded cookies can be used to overwrite existing prefixed cookie names
    Open

        rack (2.0.6)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2020-8184

    Criticality: High

    URL: https://groups.google.com/g/rubyonrails-security/c/OWtmozPH9Ak

    Solution: upgrade to ~> 2.1.4, >= 2.2.3

    sinatra does not validate expanded path matches
    Open

        sinatra (2.0.5)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2022-29970

    Criticality: High

    URL: https://github.com/sinatra/sinatra/pull/1683

    Solution: upgrade to >= 2.2.0

    Sinatra vulnerable to Reflected File Download attack
    Open

        sinatra (2.0.5)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2022-45442

    Criticality: High

    URL: https://github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw

    Solution: upgrade to ~> 2.2.3, >= 3.0.4

    Directory traversal in Rack::Directory app bundled with Rack
    Open

        rack (2.0.6)
    Severity: Critical
    Found in Gemfile.lock by bundler-audit

    Advisory: CVE-2020-8161

    Criticality: High

    URL: https://groups.google.com/forum/#!topic/ruby-security-ann/T4ZIsfRf2eA

    Solution: upgrade to ~> 2.1.3, >= 2.2.0

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      render() {
        const notification = this.props.notification || nullNotification;
        const props = {
          className: "list-item",
          innerDivStyle : Object.assign( {}, Theme.listItem.innerDivStyle, {
    sites/src/js/view/components/positions/position-list-item.js on lines 21..38

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 185.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      render() {
        const position = this.props.position || nullPosition;
        const props = {
          className: "list-item",
          innerDivStyle : Object.assign( {}, Theme.listItem.innerDivStyle, {
    Severity: Major
    Found in sites/src/js/view/components/positions/position-list-item.js and 1 other location - About 7 hrs to fix
    sites/src/js/view/components/notifications/notification-list-item.js on lines 21..38

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 185.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export default class NotificationList extends AbstractList {
    
      constructor(props) {
        super(props);
        this.state = {};
    sites/src/js/view/components/positions/position-list.js on lines 7..35

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export default class PositionList extends AbstractList {
    
      constructor(props) {
        super(props);
        this.state = {};
    Severity: Major
    Found in sites/src/js/view/components/positions/position-list.js and 1 other location - About 7 hrs to fix
    sites/src/js/view/components/notifications/notification-list.js on lines 6..35

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Block has too many lines. [105/25]
    Open

      it 'レートがrange_pips外になっても、' \
         '外れたところからrange_periodの期間が過ぎればブレイクする' do
        checker = RangeBreakChecker.new(pairs[0], 60 * 8, 100)
    
        result = checker.check_range_break(Jiji::Model::Trading::Tick.new({

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export default class RMTLogPage extends AbstractPage {
    
      constructor(props) {
        super(props);
        this.state = {};
    Severity: Major
    Found in sites/src/js/view/components/pages/rmt-log-page.js and 1 other location - About 6 hrs to fix
    sites/src/js/view/components/pages/rmt-trading-summary-page.js on lines 8..33

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 164.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language