synapsecns/sanguine

View on GitHub
services/omnirpc/proxy/confirmable_test.go

Summary

Maintainability
F
4 days
Test Coverage

Method ProxySuite.TestParseRPCPayload has 260 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (p *ProxySuite) TestParseRPCPayload() {
    /*
      CHECK BLOCKS
    */

Severity: Major
Found in services/omnirpc/proxy/confirmable_test.go - About 1 day to fix

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

        p.checkRequest(func(client client.EVMClient) {
            bhash := common.BigToHash(new(big.Int).SetUint64(gofakeit.Uint64()))
            _, _ = client.FilterLogs(p.GetTestContext(), ethereum.FilterQuery{
                BlockHash: &bhash,
                Addresses: []common.Address{common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64()))},
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 1 hr to fix
    ethergo/client/client_test.go on lines 234..241

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.CodeAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 188..194
    services/omnirpc/proxy/confirmable_test.go on lines 265..271

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.BalanceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 239..245
    services/omnirpc/proxy/confirmable_test.go on lines 265..271

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.NonceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 188..194
    services/omnirpc/proxy/confirmable_test.go on lines 239..245

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.CodeAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), nil)
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 170..176
    services/omnirpc/proxy/confirmable_test.go on lines 248..254

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.NonceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), nil)
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 170..176
    services/omnirpc/proxy/confirmable_test.go on lines 222..228

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.BalanceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), nil)
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 2 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 222..228
    services/omnirpc/proxy/confirmable_test.go on lines 248..254

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.TransactionCount(p.GetTestContext(), common.BigToHash(new(big.Int).SetUint64(gofakeit.Uint64())))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 4 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 137..143
    services/omnirpc/proxy/confirmable_test.go on lines 179..185
    services/omnirpc/proxy/confirmable_test.go on lines 230..236
    services/omnirpc/proxy/confirmable_test.go on lines 256..262

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.PendingBalanceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 4 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 113..119
    services/omnirpc/proxy/confirmable_test.go on lines 137..143
    services/omnirpc/proxy/confirmable_test.go on lines 230..236
    services/omnirpc/proxy/confirmable_test.go on lines 256..262

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.TransactionReceipt(p.GetTestContext(), common.BigToHash(new(big.Int).SetUint64(gofakeit.Uint64())))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 4 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 113..119
    services/omnirpc/proxy/confirmable_test.go on lines 179..185
    services/omnirpc/proxy/confirmable_test.go on lines 230..236
    services/omnirpc/proxy/confirmable_test.go on lines 256..262

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.PendingNonceAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 4 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 113..119
    services/omnirpc/proxy/confirmable_test.go on lines 137..143
    services/omnirpc/proxy/confirmable_test.go on lines 179..185
    services/omnirpc/proxy/confirmable_test.go on lines 230..236

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.PendingCodeAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 4 other locations - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 113..119
    services/omnirpc/proxy/confirmable_test.go on lines 137..143
    services/omnirpc/proxy/confirmable_test.go on lines 179..185
    services/omnirpc/proxy/confirmable_test.go on lines 256..262

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.FilterLogs(p.GetTestContext(), ethereum.FilterQuery{
                FromBlock: nil,
                ToBlock:   nil,
                Addresses: []common.Address{common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64()))},
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 1 hr to fix
    ethergo/client/client_test.go on lines 224..231

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.HeaderByNumber(p.GetTestContext(), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 63..69

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.BlockByNumber(p.GetTestContext(), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 1 hr to fix
    services/omnirpc/proxy/confirmable_test.go on lines 85..91

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.PendingCallContract(p.GetTestContext(), ethereum.CallMsg{})
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 45 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 364..370

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.EstimateGas(p.GetTestContext(), ethereum.CallMsg{})
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 45 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 337..343

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.StorageAt(p.GetTestContext(), common.BigToAddress(new(big.Int).SetUint64(gofakeit.Uint64())), common.BigToHash(new(big.Int).SetUint64(gofakeit.Uint64())), new(big.Int).SetUint64(gofakeit.Uint64()))
        }, func(body []byte) {
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 40 mins to fix
    ethergo/client/client_test.go on lines 193..195

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.HeaderByNumber(p.GetTestContext(), nil)
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 54..60

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

    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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.BlockByNumber(p.GetTestContext(), nil)
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Minor
    Found in services/omnirpc/proxy/confirmable_test.go and 1 other location - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 76..82

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.BlockNumber(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 121..127
    services/omnirpc/proxy/confirmable_test.go on lines 149..155
    services/omnirpc/proxy/confirmable_test.go on lines 157..163
    services/omnirpc/proxy/confirmable_test.go on lines 348..354
    services/omnirpc/proxy/confirmable_test.go on lines 356..362

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.SuggestGasPrice(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 94..100
    services/omnirpc/proxy/confirmable_test.go on lines 121..127
    services/omnirpc/proxy/confirmable_test.go on lines 149..155
    services/omnirpc/proxy/confirmable_test.go on lines 157..163
    services/omnirpc/proxy/confirmable_test.go on lines 356..362

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.NetworkID(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 94..100
    services/omnirpc/proxy/confirmable_test.go on lines 121..127
    services/omnirpc/proxy/confirmable_test.go on lines 149..155
    services/omnirpc/proxy/confirmable_test.go on lines 348..354
    services/omnirpc/proxy/confirmable_test.go on lines 356..362

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.PendingTransactionCount(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 94..100
    services/omnirpc/proxy/confirmable_test.go on lines 149..155
    services/omnirpc/proxy/confirmable_test.go on lines 157..163
    services/omnirpc/proxy/confirmable_test.go on lines 348..354
    services/omnirpc/proxy/confirmable_test.go on lines 356..362

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.SuggestGasTipCap(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 94..100
    services/omnirpc/proxy/confirmable_test.go on lines 121..127
    services/omnirpc/proxy/confirmable_test.go on lines 149..155
    services/omnirpc/proxy/confirmable_test.go on lines 157..163
    services/omnirpc/proxy/confirmable_test.go on lines 348..354

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

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

        p.checkRequest(func(client client.EVMClient) {
            _, _ = client.SyncProgress(p.GetTestContext())
        }, func(body []byte) {
            confirmable, err := proxy.IsConfirmable(body)
            Nil(p.T(), err)
    Severity: Major
    Found in services/omnirpc/proxy/confirmable_test.go and 5 other locations - About 35 mins to fix
    services/omnirpc/proxy/confirmable_test.go on lines 94..100
    services/omnirpc/proxy/confirmable_test.go on lines 121..127
    services/omnirpc/proxy/confirmable_test.go on lines 157..163
    services/omnirpc/proxy/confirmable_test.go on lines 348..354
    services/omnirpc/proxy/confirmable_test.go on lines 356..362

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

    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

    There are no issues that match your filters.

    Category
    Status