CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Function post_id_handler has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function post_id_handler()
    {
        global $FANNIE_OP_DB;
        $dbc = FannieDB::get($FANNIE_OP_DB);
        $scale = new ServiceScalesModel($dbc);
Severity: Minor
Found in fannie/item/hobartcsv/ScaleEditor.php - 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

Method ReadAttributeElements has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        private Dictionary<string, string> ReadAttributeElements(JsonReader reader, XmlNamespaceManager manager)
        {
            Dictionary<string, string> attributeNameValues = new Dictionary<string, string>();
            bool finishedAttributes = false;
            bool finishedElement = false;

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 ParseComment has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        private void ParseComment()
        {
            // should have already parsed / character before reaching this method
            _charPos++;

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 Operation has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        private static bool Operation(ExpressionType operation, object objA, object objB, out object result)
        {
            if (objA is string || objB is string)
            {
                if (operation == ExpressionType.Add || operation == ExpressionType.AddAssign)

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 ParseValue has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        private object ParseValue()
        {
            char currentChar = _expression[_currentIndex];
            if (currentChar == '\'')
            {

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 Create has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        public static ReflectionObject Create(Type t, MethodBase creator, params string[] memberNames)
        {
            ReflectionObject d = new ReflectionObject();

            ReflectionDelegateFactory delegateFactory = JsonTypeReflector.ReflectionDelegateFactory;

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 IntLength has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

        public static int IntLength(ulong i)
        {
            if (i < 10000000000)
            {
                if (i < 10) return 1;

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 Read has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
Open

    override public void Read()
    {
        WriteMessageToDevice(OfflineMessage());
        WriteMessageToDevice(OnlineMessage());
        HandleMsg("termReset");

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

function ND_show(pf){
    ParentField = pf;

    if (top.main_frame.document.getElementById('numpad')){
        top.main_frame.document.getElementById('numpad').style.display = 'block';
Severity: Major
Found in pos/is4c-nf/js/Numbers.js and 1 other location - About 3 hrs to fix
pos/is4c-nf/js/Letters.js on lines 4..13

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpOrder.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['directAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDirect.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['floralAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpFloral.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpOrder.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

function LD_show(pf){
    LD_ParentField = pf;

    if (top.main_frame.document.getElementById('letterpad')){
        top.main_frame.document.getElementById('letterpad').style.display = 'block';
Severity: Major
Found in pos/is4c-nf/js/Letters.js and 1 other location - About 3 hrs to fix
pos/is4c-nf/js/Numbers.js on lines 4..13

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['directAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDirect.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

for o, a in opts:
    if o in ("-u", "--user"): SITE_LOGIN=a
    elif o in ("-p", "--pass"): SITE_PASSWD=a
    elif o in ("-a", "--account"): ACCOUNT=a
fannie/modules/plugins2.0/USFoodsInvoiceGrabber/noauto/usf.py on lines 28..31
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi2.py on lines 32..35

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

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

for o, a in opts:
    if o in ("-u", "--user"): USER=a
    elif o in ("-p", "--pass"): PASS=a
    elif o in ("-v", "--verbose"): VERBOSE=True
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi.py on lines 31..34
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi2.py on lines 32..35

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

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

for o, a in opts:
    if o in ("-u", "--user"): SITE_LOGIN=a
    elif o in ("-p", "--pass"): SITE_PASSWD=a
    elif o in ("-a", "--account"): ACCOUNT=a
fannie/modules/plugins2.0/USFoodsInvoiceGrabber/noauto/usf.py on lines 28..31
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi.py on lines 31..34

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

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