oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

Function parseElement has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function parseElement(context, ancestors) {
    // Start tag.
    const wasInPre = context.inPre;
    const wasInVPre = context.inVPre;
    const parent = last(ancestors);
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

    Function whenTransitionEnds has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
        const id = (el._endId = ++endId);
        const resolveIfNotStale = () => {
                if (id === el._endId) {
                        resolve();
    Severity: Minor
    Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

      Function submitUsers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              submitUsers() {
                  const original_users = this.$data.original_users;
                  function difference(a, b) {
                      a = new Set(a);
                      b = new Set(b);
      Severity: Minor
      Found in cherrydoor/static/components/ManageUsers.js - About 1 hr to fix

        Function createMethod has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var createMethod = function (TYPE) {
          var IS_MAP = TYPE == 1;
          var IS_FILTER = TYPE == 2;
          var IS_SOME = TYPE == 3;
          var IS_EVERY = TYPE == 4;
        Severity: Minor
        Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

          Function setup_app has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def setup_app(loop=asyncio.get_event_loop(), config=load_config()[0]):
              """Create the app and initiate all services (database, security, etc).
          
              Parameters
              ----------
          Severity: Minor
          Found in cherrydoor/app.py - About 1 hr to fix

            Function getSubstitution has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
                var tailPos = position + matched.length;
                var m = captures.length;
                var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
                if (namedCaptures !== undefined) {
            Severity: Minor
            Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

              Function getClosestHourItem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getClosestHourItem: function getClosestHourItem(currentValue) {
                    var _this18 = this;
              
                    var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'U';
              
              
              Severity: Minor
              Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

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

                            if (
                                container.scrollHeight - container.scrollTop <
                                container.clientHeight * 1.5
                            ) {
                                setTimeout(() => {
                Severity: Major
                Found in cherrydoor/static/components/SerialConsole.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/SerialConsole.js on lines 24..31

                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 59.

                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

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

                                if (
                                    container.scrollHeight - container.scrollTop <
                                    container.clientHeight * 1.5
                                ) {
                                    setTimeout(() => {
                Severity: Major
                Found in cherrydoor/static/components/SerialConsole.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/SerialConsole.js on lines 40..47

                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 59.

                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

                exports.BROKEN_CARET = fails(function () {
                  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
                  var re = RE('^r', 'gy');
                  re.lastIndex = 2;
                  return re.exec('str') != null;
                Severity: Major
                Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/VueTimepicker.js on lines 2557..2562

                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 59.

                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

                    toRightColumn: function toRightColumn(currentColumn) {
                      var targetItem = this.getActiveItemInSideColumn(currentColumn, false) || this.getFirstItemInSideColumn(currentColumn, false);
                
                      if (targetItem) {
                        targetItem.focus();
                Severity: Major
                Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/VueTimepicker.js on lines 6878..6884

                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 59.

                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

                    toLeftColumn: function toLeftColumn(currentColumn) {
                      var targetItem = this.getActiveItemInSideColumn(currentColumn, true) || this.getFirstItemInSideColumn(currentColumn, true);
                
                      if (targetItem) {
                        targetItem.focus();
                Severity: Major
                Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/VueTimepicker.js on lines 6885..6891

                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 59.

                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

                exports.UNSUPPORTED_Y = fails(function () {
                  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
                  var re = RE('a', 'y');
                  re.lastIndex = 2;
                  return re.exec('abcd') != null;
                Severity: Major
                Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 1 hr to fix
                cherrydoor/static/components/VueTimepicker.js on lines 2564..2569

                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 59.

                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

                Function generateCodeFrame has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function generateCodeFrame(source, start = 0, end = source.length) {
                    const lines = source.split(/\r?\n/);
                    let count = 0;
                    const res = [];
                    for (let i = 0; i < lines.length; i++) {
                Severity: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                  Function flushJobs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function flushJobs(seen) {
                      isFlushPending = false;
                      isFlushing = true;
                      {
                              seen = seen || new Map();
                  Severity: Minor
                  Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                    Function resolvePropValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function resolvePropValue(options, props, key, value, instance, isAbsent) {
                        const opt = options[key];
                        if (opt != null) {
                                const hasDefault = hasOwn(opt, 'default');
                                // default values
                    Severity: Minor
                    Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                      Function transformBind has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const transformBind = (dir, _node, context) => {
                          const { exp, modifiers, loc } = dir;
                          const arg = dir.arg;
                          if (arg.type !== 4 /* SIMPLE_EXPRESSION */) {
                                  arg.children.unshift(`(`);
                      Severity: Minor
                      Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                        Function remove has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            const remove = vnode => {
                                    const { type, el, anchor, transition } = vnode;
                                    if (type === Fragment) {
                                            removeFragment(el, anchor);
                                            return;
                        Severity: Minor
                        Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                          Function set has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              set({ _: instance }, key, value) {
                                      const { data, setupState, ctx } = instance;
                                      if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
                                              setupState[key] = value;
                                      }
                          Severity: Minor
                          Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                            Function createInstanceBlock has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function createInstanceBlock(type, target) {
                                        target = extend({}, target);
                                        if (!Object.keys(target).length) {
                                                return ['span', {}];
                                        }
                            Severity: Minor
                            Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language