Method scanner.postprocessor
has a Cognitive Complexity of 145 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) postprocessor() {
// from:
// DIMENSION M(100), A(2)
// to:
// DIMENSION M(100)
- Read upRead up
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 scanner.scanNumbers
has a Cognitive Complexity of 84 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanNumbers() {
numb:
var again bool
for e := s.nodes.Front(); e != nil; e = e.Next() {
if e.Value.(*node).tok != ftUndefine {
- Read upRead up
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 scanner.scanTokens
has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanTokens() {
entities := []struct {
tok token.Token
pattern []string
}{
- Read upRead up
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
File scan.go
has 1045 lines of code (exceeds 1000 allowed). Consider refactoring. Confirmed
package fortran
import (
"bytes"
"container/list"
Method scanner.mergeLines
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) mergeLines() {
if s.nodes.Len() < 2 {
return
}
merge:
- Read upRead up
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 scanner.scanStrings
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanStrings() {
again:
for e := s.nodes.Front(); e != nil; e = e.Next() {
if e.Value.(*node).tok != ftUndefine {
continue
- Read upRead up
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 scanner.scanDoubleColon
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanDoubleColon() {
for e := s.nodes.Front(); e != nil; e = e.Next() {
if !(e.Value.(*node).tok == ftDoubleColon) {
continue
}
- Read upRead up
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 scanner.scanNextComments
has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanNextComments() {
Op:
var again bool
for e := s.nodes.Front(); e != nil; e = e.Next() {
if e.Value.(*node).tok != ftUndefine {
- Read upRead up
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 scanner.scanEmpty
has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanEmpty() {
empty:
var again bool
for e := s.nodes.Front(); e != nil; e = e.Next() {
if e.Value.(*node).tok != ftUndefine {
- Read upRead up
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 scanner.postprocessor
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
func (s *scanner) postprocessor() {
// from:
// DIMENSION M(100), A(2)
// to:
// DIMENSION M(100)
Avoid deeply nested control flow statements. Open
if !isDigit(e.Value.(*node).b[en]) {
break
}
Avoid deeply nested control flow statements. Open
if e.Value.(*node).b[en] == '.' {
for en = en + 1; en < len(e.Value.(*node).b); en++ {
if !isDigit(e.Value.(*node).b[en]) {
break
}
Avoid deeply nested control flow statements. Open
if en < len(e.Value.(*node).b) &&
(isFloatLetter(e.Value.(*node).b[en])) {
if en+1 < len(e.Value.(*node).b) &&
(e.Value.(*node).b[en+1] == '+' || e.Value.(*node).b[en+1] == '-') {
en++
Method scanner.scanTokensAfter
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
func (s *scanner) scanTokensAfter() {
entities := []struct {
tok token.Token
pattern []string
}{
- Read upRead up
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"