christoph2/pyA2L

View on GitHub

Showing 171 of 238 total issues

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

    def exitFncValues(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        indexMode = ctx.indexMode.text
        addresstype = ctx.addresstype.value
Severity: Major
Found in pya2l/a2l_listener.py and 6 other locations - About 4 hrs to fix
pya2l/a2l_listener.py on lines 1048..1054
pya2l/a2l_listener.py on lines 1484..1495
pya2l/a2l_listener.py on lines 1497..1508
pya2l/a2l_listener.py on lines 1510..1521
pya2l/a2l_listener.py on lines 1523..1534
pya2l/a2l_listener.py on lines 1536..1547

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

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

    def exitFixAxisPar(self, ctx):
        offset = ctx.offset.value
        shift = ctx.shift.value
        numberapo = ctx.numberapo.value
        ctx.value = model.FixAxisPar(offset=offset, shift=shift, numberapo=numberapo)
Severity: Major
Found in pya2l/a2l_listener.py and 1 other location - About 3 hrs to fix
pya2l/a2l_listener.py on lines 630..635

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

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

    def exitFixAxisParDist(self, ctx):
        offset = ctx.offset.value
        distance = ctx.distance.value
        numberapo = ctx.numberapo.value
        ctx.value = model.FixAxisParDist(offset=offset, distance=distance, numberapo=numberapo)
Severity: Major
Found in pya2l/a2l_listener.py and 1 other location - About 3 hrs to fix
pya2l/a2l_listener.py on lines 623..628

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

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

    def exitVirtualCharacteristic(self, ctx):
        formula_ = ctx.formula_.value
        characteristic_ = self.getList(ctx.characteristic_)
        ctx.value = model.VirtualCharacteristic(formula=formula_, characteristic_id=characteristic_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 1 other location - About 3 hrs to fix
pya2l/a2l_listener.py on lines 652..656

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

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

    def exitDependentCharacteristic(self, ctx):
        formula_ = ctx.formula_.value
        characteristic_ = self.getList(ctx.characteristic_)
        ctx.value = model.DependentCharacteristic(formula=formula_, characteristic_id=characteristic_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 1 other location - About 3 hrs to fix
pya2l/a2l_listener.py on lines 668..672

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

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

    def exitNoAxisPts4(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPts4(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddrY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddrY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddr5(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddr5(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitRipAddrZ(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.RipAddrZ(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitDistOpY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.DistOpY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitMaxRefresh(self, ctx):
        scalingUnit = ctx.scalingUnit.value
        rate = ctx.rate.value
        ctx.value = model.MaxRefresh(scalingUnit=scalingUnit, rate=rate)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoAxisPtsY(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPtsY(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSystemConstant(self, ctx):
        name = ctx.name.value
        value_ = ctx.value_.value
        ctx.value = model.SystemConstant(name=name, value=value_)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitShiftOpZ(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.ShiftOpZ(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoRescaleX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoRescaleX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitShiftOpX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.ShiftOpX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSymbolLink(self, ctx):
        symbolName = ctx.symbolName.value
        offset = ctx.offset.value
        ctx.value = model.SymbolLink(symbolName=symbolName, offset=offset)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitNoAxisPtsX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.NoAxisPtsX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitReserved(self, ctx):
        position = ctx.position.value
        dataSize = ctx.dataSize_.value
        ctx.value = model.Reserved(position=position, dataSize=dataSize)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1864..1868
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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

    def exitSrcAddrX(self, ctx):
        position = ctx.position.value
        datatype = ctx.datatype.value
        ctx.value = model.SrcAddrX(position=position, datatype=datatype)
        self.db.session.add(ctx.value)
Severity: Major
Found in pya2l/a2l_listener.py and 44 other locations - About 2 hrs to fix
pya2l/a2l_listener.py on lines 246..250
pya2l/a2l_listener.py on lines 285..289
pya2l/a2l_listener.py on lines 325..329
pya2l/a2l_listener.py on lines 346..350
pya2l/a2l_listener.py on lines 712..716
pya2l/a2l_listener.py on lines 1340..1344
pya2l/a2l_listener.py on lines 1624..1628
pya2l/a2l_listener.py on lines 1630..1634
pya2l/a2l_listener.py on lines 1636..1640
pya2l/a2l_listener.py on lines 1642..1646
pya2l/a2l_listener.py on lines 1648..1652
pya2l/a2l_listener.py on lines 1692..1696
pya2l/a2l_listener.py on lines 1698..1702
pya2l/a2l_listener.py on lines 1704..1708
pya2l/a2l_listener.py on lines 1710..1714
pya2l/a2l_listener.py on lines 1716..1720
pya2l/a2l_listener.py on lines 1722..1726
pya2l/a2l_listener.py on lines 1732..1736
pya2l/a2l_listener.py on lines 1738..1742
pya2l/a2l_listener.py on lines 1744..1748
pya2l/a2l_listener.py on lines 1750..1754
pya2l/a2l_listener.py on lines 1756..1760
pya2l/a2l_listener.py on lines 1762..1766
pya2l/a2l_listener.py on lines 1768..1772
pya2l/a2l_listener.py on lines 1774..1778
pya2l/a2l_listener.py on lines 1780..1784
pya2l/a2l_listener.py on lines 1786..1790
pya2l/a2l_listener.py on lines 1792..1796
pya2l/a2l_listener.py on lines 1798..1802
pya2l/a2l_listener.py on lines 1804..1808
pya2l/a2l_listener.py on lines 1810..1814
pya2l/a2l_listener.py on lines 1816..1820
pya2l/a2l_listener.py on lines 1822..1826
pya2l/a2l_listener.py on lines 1828..1832
pya2l/a2l_listener.py on lines 1834..1838
pya2l/a2l_listener.py on lines 1840..1844
pya2l/a2l_listener.py on lines 1846..1850
pya2l/a2l_listener.py on lines 1852..1856
pya2l/a2l_listener.py on lines 1858..1862
pya2l/a2l_listener.py on lines 1870..1874
pya2l/a2l_listener.py on lines 1876..1880
pya2l/a2l_listener.py on lines 1882..1886
pya2l/a2l_listener.py on lines 1888..1892
pya2l/a2l_listener.py on lines 1934..1938

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

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