sibprogrammer/owp

View on GitHub

Showing 803 of 803 total issues

Method reset_password has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  def reset_password
    if params.key?(:user_id) and params.key?(:hash)
      user = User.find(params[:user_id])
      if user
        hash = Digest::SHA1.hexdigest(user.crypted_password + user.login)
Severity: Minor
Found in app/controllers/sessions_controller.rb - About 1 hr 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 errorHandler has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Owp.form.errorHandler = function(form, action, params) {
  if ('client' == action.failureType) {
    return
  }
  
Severity: Minor
Found in public/javascripts/application.js - About 1 hr to fix

    Method install_daemon has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def install_daemon(root_password)
        if root_password.blank?
          self.errors.add :root_password, :empty
          return false
        end
    Severity: Minor
    Found in app/models/hardware_server.rb - About 1 hr to fix

      Method sync_virtual_servers has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def sync_virtual_servers
          ves_on_server = rpc_client.exec('vzlist', '-a -H -o veid,hostname,ip,status')['output'].split("\n")
          # skip error lines
          ves_on_server = ves_on_server.find_all{ |item| item =~ /^\s*\d+/ }
      
      
      Severity: Minor
      Found in app/models/hardware_server.rb - About 1 hr to fix

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

        if(Ext.grid.GridPanel){
          Ext.grid.GridPanel.prototype.ddText = "{0} selected row(s)";
          Ext.grid.GridPanel.prototype.ddText = "{0} baris terpilih";
        }
        Severity: Major
        Found in public/ext/locale/ext-lang-id.js and 1 other location - About 1 hr to fix
        public/ext/locale/ext-lang-id.js on lines 33..36

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

        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

        if(Ext.form.Field){
          Ext.form.Field.prototype.invalidText = "The value in this field is invalid";
          Ext.form.Field.prototype.invalidText = "Isian belum benar";
        }
        Severity: Major
        Found in public/ext/locale/ext-lang-id.js and 1 other location - About 1 hr to fix
        public/ext/locale/ext-lang-id.js on lines 23..26

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

        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

        Method profile has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

          def profile
            @page_title = t('admin.my_profile.title')
        
            if request.post?
              if !params[:password].blank?
        Severity: Minor
        Found in app/controllers/iphone/users_controller.rb - About 1 hr 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

        Method sync_backups has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

          def sync_backups
            backups_list = rpc_client.exec('ls', "--block-size=M -s #{backups_dir}")['output']
            backups_list = backups_list.split("\n")
            # remove totals line
            backups_list.shift
        Severity: Minor
        Found in app/models/hardware_server.rb - About 1 hr 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 brMoney has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

          Ext.util.Format.brMoney = function(v){
            v = (Math.round((v - 0) * 100)) / 100;
            v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
            v = String(v);
            var ps = v.split('.');
        Severity: Minor
        Found in public/ext/locale/ext-lang-pt_BR.js - About 1 hr 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

        Method virtual_server_properties has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def virtual_server_properties(virtual_server)
              params = [
                {
                  :parameter => t('admin.virtual_servers.form.create_server.field.identity'),
                  :value => virtual_server.identity,
        Severity: Minor
        Found in app/controllers/admin/virtual_servers_controller.rb - About 1 hr 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

        Method load_data has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

          def load_data
            virtual_server = VirtualServer.find_by_id(params[:id])
            redirect_to :controller => 'dashboard' and return if !virtual_server or !@current_user.can_control(virtual_server)
        
            render :json => { :success => true, :data => {
        Severity: Minor
        Found in app/controllers/admin/virtual_servers_controller.rb - About 1 hr 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

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

        if(Ext.form.VTypes){
           Ext.apply(Ext.form.VTypes, {
              emailText    : 'Toto pole musí byť e-mailová adresa vo formáte "user@example.com"',
              urlText      : 'Toto pole musí byť URL vo formáte "http:/'+'/www.example.com"',
              alphaText    : 'Toto pole može obsahovať iba písmená a znak _',
        Severity: Major
        Found in public/ext/locale/ext-lang-sk.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
            Ext.apply(Ext.form.VTypes, {
               emailText    : '此欄位必須輸入像 "user@example.com" 之E-Mail格式',
               urlText      : '此欄位必須輸入像 "http:/'+'/www.example.com" 之網址格式',
               alphaText    : '此欄位僅能輸入半形英文字母及底線( _ )符號',
        Severity: Major
        Found in public/ext/locale/ext-lang-zh_TW.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156

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

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

        if(Ext.form.VTypes){
          Ext.apply(Ext.form.VTypes, {
            emailText    : 'This field should be an e-mail address in the format "user@example.com"',
            urlText      : 'This field should be a URL in the format "http:/'+'/www.example.com"',
            alphaText    : 'This field should only contain letters and _',
        Severity: Major
        Found in public/ext/locale/ext-lang-en.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
            Ext.apply(Ext.form.VTypes, {
                emailText        : 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"',
                urlText            : 'To pole wymaga podania adresu strony www w formacie: "http:/'+'/www.domena.pl"',
                alphaText        : 'To pole wymaga podania tylko liter i _',
        Severity: Major
        Found in public/ext/locale/ext-lang-pl.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
           Ext.apply(Ext.form.VTypes, {
              emailText    : 'To polje je e-mail naslov formata "ime@domena.si"',
              urlText      : 'To polje je URL naslov formata "http:/'+'/www.domena.si"',
              alphaText    : 'To polje lahko vsebuje samo črke in _',
        Severity: Major
        Found in public/ext/locale/ext-lang-sl.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
           Ext.apply(Ext.form.VTypes, {
              emailText    : 'Ce champ doit contenir une adresse email au format: "usager@example.com"',
              urlText      : 'Ce champ doit contenir une URL au format suivant: "http:/'+'/www.example.com"',
              alphaText    : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)',
        Severity: Major
        Found in public/ext/locale/ext-lang-fr.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
          Ext.apply(Ext.form.VTypes, {
            emailText: 'Dit veld moet een e-mail adres bevatten in het formaat "gebruiker@domein.nl"',
            urlText: 'Dit veld moet een URL bevatten in het formaat "http:/'+'/www.domein.nl"',
            alphaText: 'Dit veld mag alleen letters en _ bevatten',
        Severity: Major
        Found in public/ext/locale/ext-lang-nl.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
          Ext.apply(Ext.form.VTypes, {
            emailText     : 'Это поле должно содержать адрес электронной почты в формате "user@example.com"',
            urlText       : 'Это поле должно содержать URL в формате "http:/'+'/www.example.com"',
            alphaText     : 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"',
        Severity: Major
        Found in public/ext/locale/ext-lang-ru.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-no_NN.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

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

        if(Ext.form.VTypes){
           Ext.apply(Ext.form.VTypes, {
              emailText    : 'Dette feltet skal vere ei epost adresse på formatet "bruker@domene.no"',
              urlText      : 'Dette feltet skal vere ein link (URL) på formatet "http:/'+'/www.domene.no"',
              alphaText    : 'Dette feltet skal berre innehalde bokstavar og _',
        Severity: Major
        Found in public/ext/locale/ext-lang-no_NN.js and 41 other locations - About 1 hr to fix
        public/ext/locale/ext-lang-bg.js on lines 168..175
        public/ext/locale/ext-lang-ca.js on lines 177..184
        public/ext/locale/ext-lang-cs.js on lines 175..182
        public/ext/locale/ext-lang-da.js on lines 178..185
        public/ext/locale/ext-lang-de.js on lines 187..194
        public/ext/locale/ext-lang-el_GR.js on lines 189..196
        public/ext/locale/ext-lang-en.js on lines 185..192
        public/ext/locale/ext-lang-en_GB.js on lines 181..188
        public/ext/locale/ext-lang-es.js on lines 180..187
        public/ext/locale/ext-lang-fa.js on lines 162..169
        public/ext/locale/ext-lang-fi.js on lines 180..187
        public/ext/locale/ext-lang-fr.js on lines 202..209
        public/ext/locale/ext-lang-fr_CA.js on lines 186..193
        public/ext/locale/ext-lang-gr.js on lines 143..150
        public/ext/locale/ext-lang-he.js on lines 174..181
        public/ext/locale/ext-lang-hr.js on lines 177..184
        public/ext/locale/ext-lang-hu.js on lines 178..185
        public/ext/locale/ext-lang-id.js on lines 184..191
        public/ext/locale/ext-lang-it.js on lines 176..183
        public/ext/locale/ext-lang-ja.js on lines 180..187
        public/ext/locale/ext-lang-ko.js on lines 147..154
        public/ext/locale/ext-lang-lt.js on lines 189..196
        public/ext/locale/ext-lang-lv.js on lines 144..151
        public/ext/locale/ext-lang-mk.js on lines 144..151
        public/ext/locale/ext-lang-nl.js on lines 185..192
        public/ext/locale/ext-lang-no_NB.js on lines 176..183
        public/ext/locale/ext-lang-pl.js on lines 186..193
        public/ext/locale/ext-lang-pt.js on lines 150..157
        public/ext/locale/ext-lang-pt_BR.js on lines 192..199
        public/ext/locale/ext-lang-pt_PT.js on lines 175..182
        public/ext/locale/ext-lang-ro.js on lines 176..183
        public/ext/locale/ext-lang-ru.js on lines 190..197
        public/ext/locale/ext-lang-sk.js on lines 150..157
        public/ext/locale/ext-lang-sl.js on lines 144..151
        public/ext/locale/ext-lang-sr.js on lines 147..154
        public/ext/locale/ext-lang-sr_RS.js on lines 146..153
        public/ext/locale/ext-lang-sv_SE.js on lines 146..153
        public/ext/locale/ext-lang-th.js on lines 176..183
        public/ext/locale/ext-lang-ukr.js on lines 151..158
        public/ext/locale/ext-lang-vn.js on lines 149..156
        public/ext/locale/ext-lang-zh_TW.js on lines 146..153

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

        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