antimalware/manul

View on GitHub

Showing 400 of 400 total issues

File analyzer.table.js has 4498 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* ../../libs/bem-core/node_modules/ym/modules.js begin */
/**
 * Modules
 *
 * Copyright (c) 2013 Filatov Dmitry (dfilatov@yandex-team.ru)
Severity: Major
Found in src/log_analyzer/js/analyzer.table.js - About 1 wk to fix

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

    if ($currentLang === 'uk') {
        define('PS_SCANNING_FILE', 'Скануємо');
        define('PS_SCANNING_OF', 'із');
        define('PS_CHECKER_ROOT_READABLE', 'Кореневий каталог доступний для читання:');
        define('PS_SEND_REPORT_BUTTON', 'Надіслати звіт');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 240..334

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

    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 4 locations. Consider refactoring.
    Open

    if ($currentLang === 'en') {
        define('PS_SCANNING_FILE', 'Scanning');
        define('PS_SCANNING_OF', 'out of');
        define('PS_SEND_REPORT_BUTTON', 'Send report');
        define('PS_ERR_NO_TEMP_FOLDER', 'Temporary files can not be created: the Temp and Manul folders are not available for writing.');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 240..334
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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 4 locations. Consider refactoring.
    Open

    if ($currentLang === 'tr') {
        define('PS_SCANNING_FILE', 'Taranıyor');
        define('PS_SCANNING_OF', 'Toplam dosyadan taranan dosya sayısı: ');
        define('PS_CHECKER_ROOT_READABLE', 'Ana klasör salt okunur:');
        define('PS_SEND_REPORT_BUTTON', 'Raporu gönder');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 46..140
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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 4 locations. Consider refactoring.
    Open

    if ($currentLang === 'ru') {
        define('PS_SCANNING_FILE', 'Сканируем');
        define('PS_SCANNING_OF', 'из');
        define('PS_SEND_REPORT_BUTTON', 'Отправить отчет');
        define('PS_ERR_NO_TEMP_FOLDER', 'Невозможно создать временные файлы: временный системный каталог и текущий каталог Manul не доступны для записи.');
    Severity: Major
    Found in src/scanner/classes/Localization.inc.php and 3 other locations - About 6 days to fix
    src/scanner/classes/Localization.inc.php on lines 143..237
    src/scanner/classes/Localization.inc.php on lines 240..334
    src/scanner/classes/Localization.inc.php on lines 337..431

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

    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

    File inflate.js has 1683 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     Copyright (c) 2013 Gildas Lormeau. All rights reserved.
    
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
    Severity: Major
    Found in src/log_analyzer/js/inflate.js - About 4 days to fix

      Function Deflate has 853 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function Deflate() {
      
              var that = this;
              var strm; // pointer back to this zlib stream
              var status; // as the name implies
      Severity: Major
      Found in src/log_analyzer/js/deflate.js - About 4 days to fix

        File deflate.js has 1295 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         Copyright (c) 2013 Gildas Lormeau. All rights reserved.
        
         Redistribution and use in source and binary forms, with or without
         modification, are permitted provided that the following conditions are met:
        Severity: Major
        Found in src/log_analyzer/js/deflate.js - About 3 days to fix

          Function xml2json has a Cognitive Complexity of 152 (exceeds 5 allowed). Consider refactoring.
          Open

          function xml2json(xml, tab) {
             var X = {
                toObj: function(xml) {
                   var o = {};
                   if (xml.nodeType==1) {   // element node ..
          Severity: Minor
          Found in src/log_analyzer/js/xml2json.js - About 3 days 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 init has 541 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          }(this, function init($, undefined) {
          
            "use strict";
          
            // the base DOM structure needed to create a modal
          Severity: Major
          Found in src/scanner/static/js/bootbox.js - About 2 days to fix

            Function InfCodes has 521 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function InfCodes() {
                    var that = this;
            
                    var mode; // current inflate_codes mode
            
            
            Severity: Major
            Found in src/log_analyzer/js/inflate.js - About 2 days to fix

              Function InfBlocks has 483 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function InfBlocks(z, w) {
                      var that = this;
              
                      var mode = TYPE; // current inflate_block mode
              
              
              Severity: Major
              Found in src/log_analyzer/js/inflate.js - About 2 days to fix

                File mime-types.js has 970 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 Copyright (c) 2013 Gildas Lormeau. All rights reserved.
                
                 Redistribution and use in source and binary forms, with or without
                 modification, are permitted provided that the following conditions are met:
                Severity: Major
                Found in src/log_analyzer/js/mime-types.js - About 2 days to fix

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

                          "ru": {
                              "Common.Title": "Анализатор логов",
                              "Common.SubHeader": "Анализатор логов",
                              "Common.LoadFile": "Загрузить файл",
                              "FirstScreen.LogDescription": "Чтобы просмотреть отчет о проверке сайта, загрузите лог, созданный антивирусом Manul при сканировании. Загрузить лог можно как в виде архива, так и в виде распакованного xml.",
                  Severity: Major
                  Found in src/log_analyzer/js/localization.js and 3 other locations - About 2 days to fix
                  src/log_analyzer/js/localization.js on lines 116..200
                  src/log_analyzer/js/localization.js on lines 201..284
                  src/log_analyzer/js/localization.js on lines 285..368

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

                  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 4 locations. Consider refactoring.
                  Open

                          "en": {
                              "Common.Title": "Log analyzer",        
                              "Common.SubHeader": "Log analyzer",
                              "Common.LoadFile": "Load file",
                              "FirstScreen.LogDescription": "Please upload the log file created by Manul during scanning to view the site scan report. You can upload it either as an archive, or as an unpacked xml file.",
                  Severity: Major
                  Found in src/log_analyzer/js/localization.js and 3 other locations - About 2 days to fix
                  src/log_analyzer/js/localization.js on lines 32..115
                  src/log_analyzer/js/localization.js on lines 201..284
                  src/log_analyzer/js/localization.js on lines 285..368

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

                  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 4 locations. Consider refactoring.
                  Open

                          "ua": {
                              "Common.Title": "Аналізатор логів",
                              "Common.SubHeader": "Аналізатор логів",
                              "Common.LoadFile": "Завантажити файл",
                              "FirstScreen.LogDescription": "Щоб переглянути звіт про перевірку сайту, завантажте лог, створений Манулом під час сканування. Завантажити лог можна як архівом, так і розпакованим xml.",
                  Severity: Major
                  Found in src/log_analyzer/js/localization.js and 3 other locations - About 2 days to fix
                  src/log_analyzer/js/localization.js on lines 32..115
                  src/log_analyzer/js/localization.js on lines 116..200
                  src/log_analyzer/js/localization.js on lines 201..284

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

                  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 4 locations. Consider refactoring.
                  Open

                          "tr": {
                              "Common.Title": "Kayıt denetleyicisi",
                              "Common.SubHeader": "Kayıt denetleyicisi",
                              "Common.LoadFile": "Dosyayı yükle",
                              "FirstScreen.LogDescription": "Site kontrol raporunu görmek için Manul tarafından tarama işlemi sırasında oluşturulan kayıt dosyasını yükleyiniz. Anılan kayıt dosyasını ister bir arşiv olarak isterse açılmış bir XML dosyası olarak yükleyebilirsiniz.",
                  Severity: Major
                  Found in src/log_analyzer/js/localization.js and 3 other locations - About 2 days to fix
                  src/log_analyzer/js/localization.js on lines 32..115
                  src/log_analyzer/js/localization.js on lines 116..200
                  src/log_analyzer/js/localization.js on lines 285..368

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

                  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 proc has 404 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          that.proc = function(z, r) {
                              var t; // temporary storage
                              var b; // bit buffer
                              var k; // bits in bit buffer
                              var p; // input data pointer
                  Severity: Major
                  Found in src/log_analyzer/js/inflate.js - About 2 days to fix

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

                                        if (m === 0) {
                                            if (q == s.end && s.read !== 0) {
                                                q = 0;
                                                m = q < s.read ? s.read - q - 1 : s.end - q;
                                            }
                    Severity: Major
                    Found in src/log_analyzer/js/inflate.js and 1 other location - About 1 day to fix
                    src/log_analyzer/js/inflate.js on lines 971..997

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

                    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 (m === 0) {
                                                if (q == s.end && s.read !== 0) {
                                                    q = 0;
                                                    m = q < s.read ? s.read - q - 1 : s.end - q;
                                                }
                    Severity: Major
                    Found in src/log_analyzer/js/inflate.js and 1 other location - About 1 day to fix
                    src/log_analyzer/js/inflate.js on lines 1009..1034

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

                    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