jplusplus/the-accountant

View on GitHub

Showing 27 of 35 total issues

Function gameService has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

function gameService($log, $rootScope, Step, Var, Ending, Character, I18n, memoizeMixin) {
Severity: Major
Found in src/components/game/game.service.js - About 1 hr to fix

    Function controller has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      controller($state, $scope, $timeout, hotkeys, $transitions, $localForage, $translate) {
    Severity: Major
    Found in src/containers/main/main.js - About 50 mins to fix

      Function StepService has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function StepService(Choice, Slice, Stack, I18n, Explainer, $rootScope, $log) {
      Severity: Major
      Found in src/components/step/step.service.js - About 50 mins to fix

        Function StepService has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        function StepService(Choice, Slice, Stack, I18n, Explainer, $rootScope, $log) {
          // Symbols declarion for private attributes and methods
          const _meta = Symbol('meta');
          const _game = Symbol('game');
        
        
        Severity: Minor
        Found in src/components/step/step.service.js - About 45 mins to fix

        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 webpackWrapper has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function webpackWrapper(watch, conf, done) {
          const webpackBundler = webpack(conf);
        
          const webpackChangeHandler = (err, stats) => {
            if (err) {
        Severity: Minor
        Found in gulp_tasks/webpack.js - About 35 mins to fix

        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 SliceService has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function SliceService(I18n) {
          // Symbols declarion for private attributes and methods
          const _stack = Symbol('stack');
        
          class Slice extends I18n {
        Severity: Minor
        Found in src/components/slice/slice.service.js - About 35 mins to fix

        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 ChartService has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function ChartService($filter, I18n, memoizeMixin) {
          // Symbols declarion for private attributes and methods
          const _game = Symbol('game');
          const _id = Symbol('id');
        
        
        Severity: Minor
        Found in src/components/chart/chart.service.js - About 25 mins to fix

        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

        Severity
        Category
        Status
        Source
        Language