kongou-ae/redpen-validator

View on GitHub

Showing 26 of 26 total issues

Function validateSentence has 375 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function validateSentence(sentence) {
    // 参考
    // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
    // 2.2.1. ひらがなと漢字の使い分け
    // 漢字は「全角」で表記します。漢字の使用は、平成 22 年 11 月 30 日内閣告示第 2 号の「常用漢字表」に原則として準じます。
Severity: Major
Found in use-hiragana-and-kanji-properly.js - About 1 day to fix

    Function validateSentence has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
    Open

    function validateSentence(sentence) {
        // 参考
        // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
        // 2.2.2. 算用数字と漢数字の使い分け
        // 数量を表現し、数を数えられるものは算用数字を使用します。任意の数に置き換えても通用する語句がこれに該当します。序数詞(「第~回」「~番目」「~回目」)も算用数字を使います。
    Severity: Minor
    Found in use-numeral-properly.js - About 1 day 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 validateSentence has 207 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function validateSentence(sentence) {
        // 参考
        // http://jubilee-web.jp/blog/archives/96
        var terms = [
            {
    Severity: Major
    Found in dont-use-kosoado.js - About 1 day to fix

      Function validateSentence has 157 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function validateSentence(sentence) {
          // 口語ではなく文語を使う
      
          var terms = [
              // http://www.ise.chuo-u.ac.jp/ISE/outline/Gmajor/nihongo/28.html
      Severity: Major
      Found in use-literary-style.js - About 6 hrs to fix

        Function validateSentence has 151 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function validateSentence(sentence) {
        
            var terms = [
                {
                    'pattern':'考えられる',
        Severity: Major
        Found in use-assertive-style.js - About 6 hrs to fix

          Function validateSentence has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
          Open

          function validateSentence(sentence) {
          
              var terms = [
                  {
                      'pattern':'考えられる',
          Severity: Minor
          Found in use-assertive-style.js - About 5 hrs 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 validateSentence has 144 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function validateSentence(sentence) {
              // 参考
              // http://www.slideshare.net/yoshinobumachida5/lets-write-understandable-japanese-complete-version
              // することができる問題
              var terms = [
          Severity: Major
          Found in dont-use-can-do.js - About 5 hrs to fix

            File use-hiragana-and-kanji-properly.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            function validateSentence(sentence) {
                // 参考
                // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
                // 2.2.1. ひらがなと漢字の使い分け
                // 漢字は「全角」で表記します。漢字の使用は、平成 22 年 11 月 30 日内閣告示第 2 号の「常用漢字表」に原則として準じます。
            Severity: Minor
            Found in use-hiragana-and-kanji-properly.js - About 5 hrs to fix

              Function validateSentence has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

              function validateSentence(sentence) {
              
                  var terms = [
                      /* // sample
                      {
              Severity: Minor
              Found in use-hiragana-and-kanji-properly-v2.js - About 4 hrs 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 validateSentence has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

              function validateSentence(sentence) {
                  // 参考
                  // http://www.slideshare.net/yoshinobumachida5/lets-write-understandable-japanese-complete-version
                  // することができる問題
                  var terms = [
              Severity: Minor
              Found in dont-use-can-do.js - About 4 hrs 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 validateSentence has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

              function validateSentence(sentence) {
              
                  var terms = [
                      /* // sample
                      {
              Severity: Minor
              Found in custom-pattern.js - About 4 hrs 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 validateSentence has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
              Open

              function validateSentence(sentence) {
                  // 参考
                  // http://jubilee-web.jp/blog/archives/96
                  var terms = [
                      {
              Severity: Minor
              Found in dont-use-kosoado.js - About 3 hrs 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 validateSentence has 73 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function validateSentence(sentence) {
                  // 参考
                  // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
                  // 2.2.2. 算用数字と漢数字の使い分け
                  // 数量を表現し、数を数えられるものは算用数字を使用します。任意の数に置き換えても通用する語句がこれに該当します。序数詞(「第~回」「~番目」「~回目」)も算用数字を使います。
              Severity: Major
              Found in use-numeral-properly.js - About 2 hrs to fix

                Function validateSentence has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function validateSentence(sentence) {
                    // 参考
                    // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
                    // 2.2.1. ひらがなと漢字の使い分け
                    // 漢字は「全角」で表記します。漢字の使用は、平成 22 年 11 月 30 日内閣告示第 2 号の「常用漢字表」に原則として準じます。
                Severity: Minor
                Found in use-hiragana-and-kanji-properly.js - About 2 hrs 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 validateSentence has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function validateSentence(sentence) {
                    // 口語ではなく文語を使う
                
                    var terms = [
                        // http://www.ise.chuo-u.ac.jp/ISE/outline/Gmajor/nihongo/28.html
                Severity: Minor
                Found in use-literary-style.js - About 2 hrs 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 validateSentence has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function validateSentence(sentence) {
                    // 使い方はREADMEを参照ください。
                    // https://github.com/kongou-ae/redpen-validator/blob/master/README.md
                    /*
                    console = {
                Severity: Minor
                Found in termsValidator.js - About 2 hrs 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 validateSentence has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function validateSentence(sentence) {
                    // 参考
                    // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
                    // 2.2.3. 一部の助数詞の表記
                    // 助数詞にともなう「ヵ」、「か」、「カ」、「ヶ」、「ケ」、「箇」、「個」の表記は、原則として、ひらがなの「か」を使います。
                Severity: Minor
                Found in ka-is-written-in-hiragana.js - About 2 hrs 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 validateSentence has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function validateSentence(sentence) {
                
                    var terms = [
                        /* // sample
                        {
                Severity: Major
                Found in use-hiragana-and-kanji-properly-v2.js - About 2 hrs to fix

                  Function validateSentence has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function validateSentence(sentence) {
                      // 参考
                      // https://www.jtf.jp/jp/style_guide/pdf/jtf_style_guide.pdf
                      // 4.2. 記号
                      // カタカナは「全角」で表記します。半角カタカナは特殊な用途を除いて、原則として使いません。
                  Severity: Minor
                  Found in symbol.js - About 1 hr to fix

                    Function validateSentence has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function validateSentence(sentence) {
                    
                        var terms = [
                            /* // sample
                            {
                    Severity: Minor
                    Found in custom-pattern.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language