Showing 842 of 1,553 total issues

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

  }, {
    key: "listObjs",
    value: function listObjs(miew) {
      var objs = miew._objects;
      if (!objs || !Array.isArray(objs) || objs.length === 0) {
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.js on lines 3828..3841

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

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

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

  }, {
    key: "listObjs",
    value: function listObjs(miew) {
      var objs = miew._objects;
      if (!objs || !Array.isArray(objs) || objs.length === 0) {
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3824..3837

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

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

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

var setPrototypeOf = createCommonjsModule(function (module) {
function _setPrototypeOf(o, p) {
  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3029..3038

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

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

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

var setPrototypeOf = createCommonjsModule(function (module) {
function _setPrototypeOf(o, p) {
  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.js on lines 3033..3042

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

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

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

function mergeTypedArraysUnsafe(array) {
  if (array.length <= 0) {
    return null;
  }
  var size = array.reduce(function (acc, cur) {
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 5 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3633..3647

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

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

  describe('.id', () => {
    const cColorer = new CarbonColorer()

    it("have .id property type 'string'", () => {
      expect(cColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/CarbonColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const rtColorer = new ResidueTypeColorer()

    it("have .id property type 'string'", () => {
      expect(rtColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const eColorer = new ElementColorer()

    it("have .id property type 'string'", () => {
      expect(eColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/ElementColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const mColorer = new MoleculeColorer()

    it("have .id property type 'string'", () => {
      expect(mColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/MoleuleColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

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

function mergeTypedArraysUnsafe(array) {
  if (array.length <= 0) {
    return null;
  }
  var size = array.reduce(function (acc, cur) {
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 5 hrs to fix
packages/miew-cli/dist/index.js on lines 3637..3651

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

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

  describe('.id', () => {
    const sColorer = new SequenceColorer()

    it("have .id property type 'string'", () => {
      expect(sColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/SequenceColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const cColorer = new ConformationColorer()

    it("have .id property type 'string'", () => {
      expect(cColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/ConformationColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const hColorer = new HydrophobicityColorer()

    it("have .id property type 'string'", () => {
      expect(hColorer).to.have.property('id')
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const ssColorer = new SecondaryStructureColorer()

    it("have .id property type 'string'", () => {
      expect(ssColorer).to.have.property('id')
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const oColorer = new OccupancyColorer()

    it("have .id property type 'string'", () => {
      expect(oColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/OccupancyColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

  describe('.id', () => {
    const uColorer = new UniformColorer()

    it("have .id property type 'string'", () => {
      expect(uColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/UniformColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ChainColorer.test.js on lines 67..79
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128

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

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

  describe('.id', () => {
    const cColorer = new ChainColorer()

    it("have .id property type 'string'", () => {
      expect(cColorer).to.have.property('id')
Severity: Major
Found in packages/miew/src/gfx/colorers/ChainColorer.test.js and 10 other locations - About 5 hrs to fix
packages/miew/src/gfx/colorers/CarbonColorer.test.js on lines 46..58
packages/miew/src/gfx/colorers/ConformationColorer.test.js on lines 58..70
packages/miew/src/gfx/colorers/ElementColorer.test.js on lines 83..95
packages/miew/src/gfx/colorers/HydrophobicityColorer.test.js on lines 89..101
packages/miew/src/gfx/colorers/MoleuleColorer.test.js on lines 106..118
packages/miew/src/gfx/colorers/OccupancyColorer.test.js on lines 121..133
packages/miew/src/gfx/colorers/ResidueTypeColorer.test.js on lines 57..69
packages/miew/src/gfx/colorers/SecondaryStructureColorer.test.js on lines 124..136
packages/miew/src/gfx/colorers/SequenceColorer.test.js on lines 116..128
packages/miew/src/gfx/colorers/UniformColorer.test.js on lines 21..33

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

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

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

var arrayLikeToArray = createCommonjsModule(function (module) {
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 5 hrs to fix
packages/miew-cli/dist/index.js on lines 3214..3223

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

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

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

var arrayLikeToArray = createCommonjsModule(function (module) {
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 5 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3210..3219

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

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

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

export default {
  docs: {
    dst: 'docs/auto/',
    show: 'docs/auto/index.html'
  },
Severity: Major
Found in packages/miew/tools/config.js and 1 other location - About 5 hrs to fix
demo/tools/config.js on lines 3..43

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

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