packages/miew/src/chem/selectors.test.js

Summary

Maintainability
F
3 wks
Test Coverage

File selectors.test.js has 471 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import chai, { expect } from 'chai'
import dirtyChai from 'dirty-chai'
import proxyquire from 'proxyquire'
import selectors from './selectors'
import ResidueType from './ResidueType'
Severity: Minor
Found in packages/miew/src/chem/selectors.test.js - About 7 hrs to fix

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

      describe('AndOperator', () => {
        describe('#includesAtom(atom)', () => {
          it('gives true for true and true selectors results', () => {
            expect(
              selectors.and(selectors.all(), selectors.all()).includesAtom(atom)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 day to fix
    packages/miew/src/chem/selectors.test.js on lines 487..510

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

    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

      describe('OrOperator', () => {
        describe('#includesAtom(atom)', () => {
          it('gives true for true and true selector results', () => {
            expect(
              selectors.or(selectors.all(), selectors.all()).includesAtom(atom)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 day to fix
    packages/miew/src/chem/selectors.test.js on lines 462..485

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('ResidueSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom with same residue name in same case', () => {
            expect(selectors.residue('ALA').includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 4 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 148..160
    packages/miew/src/chem/selectors.test.js on lines 173..185
    packages/miew/src/chem/selectors.test.js on lines 214..226
    packages/miew/src/chem/selectors.test.js on lines 239..251

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('ChainSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom with same chain name in same case', () => {
            expect(selectors.chain('B').includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 4 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 148..160
    packages/miew/src/chem/selectors.test.js on lines 173..185
    packages/miew/src/chem/selectors.test.js on lines 187..199
    packages/miew/src/chem/selectors.test.js on lines 214..226

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('NameSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom with such name in same case', () => {
            expect(selectors.name('CA').includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 4 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 173..185
    packages/miew/src/chem/selectors.test.js on lines 187..199
    packages/miew/src/chem/selectors.test.js on lines 214..226
    packages/miew/src/chem/selectors.test.js on lines 239..251

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('ICodeSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom with same residue ICode in same case', () => {
            expect(selectors.icode('A').includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 4 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 148..160
    packages/miew/src/chem/selectors.test.js on lines 173..185
    packages/miew/src/chem/selectors.test.js on lines 187..199
    packages/miew/src/chem/selectors.test.js on lines 239..251

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('ElemSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom with same element name in same case', () => {
            expect(selectors.elem('N').includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 4 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 148..160
    packages/miew/src/chem/selectors.test.js on lines 187..199
    packages/miew/src/chem/selectors.test.js on lines 214..226
    packages/miew/src/chem/selectors.test.js on lines 239..251

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

    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

      describe('PolarHSelector', () => {
        describe('#includesAtom(atom)', () => {
          const flags = {
            HYDROGEN: 0x0008,
            NONPOLARH: 0x1008
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 283..298

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

    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

      describe('NonPolarHSelector', () => {
        describe('#includesAtom(atom)', () => {
          const flags = {
            HYDROGEN: 0x0008,
            NONPOLARH: 0x1008
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 266..281

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

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

      describe('Acidic', () => {
        describe('#includesAtom(atom)', () => {
          it('includes acidic atom', () => {
            atom.residue._type.flags = ResidueType.Flags.ACIDIC
            expect(selectors.acidic().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Purine', () => {
        describe('#includesAtom(atom)', () => {
          it('includes purine atom', () => {
            atom.residue._type.flags = ResidueType.Flags.PURINE
            expect(selectors.purine().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Pyrimidine', () => {
        describe('#includesAtom(atom)', () => {
          it('includes pyrimidine atom', () => {
            atom.residue._type.flags = ResidueType.Flags.PYRIMIDINE
            expect(selectors.pyrimidine().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Water', () => {
        describe('#includesAtom(atom)', () => {
          it('includes water atom', () => {
            atom.residue._type.flags = ResidueType.Flags.WATER
            expect(selectors.water().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432

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

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

      describe('Protein', () => {
        describe('#includesAtom(atom)', () => {
          it('includes protein atom', () => {
            atom.residue._type.flags = ResidueType.Flags.PROTEIN
            expect(selectors.protein().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Polar', () => {
        describe('#includesAtom(atom)', () => {
          it('includes polar atom', () => {
            atom.residue._type.flags = ResidueType.Flags.POLAR
            expect(selectors.polar().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Basic', () => {
        describe('#includesAtom(atom)', () => {
          it('includes basic atom', () => {
            atom.residue._type.flags = ResidueType.Flags.BASIC
            expect(selectors.basic().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('NonPolar', () => {
        describe('#includesAtom(atom)', () => {
          it('includes nonPolar atom', () => {
            atom.residue._type.flags = ResidueType.Flags.NONPOLAR
            expect(selectors.nonpolar().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Aromatic', () => {
        describe('#includesAtom(atom)', () => {
          it('includes aromatic atom', () => {
            atom.residue._type.flags = ResidueType.Flags.AROMATIC
            expect(selectors.aromatic().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 395..406
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

      describe('Nucleic', () => {
        describe('#includesAtom(atom)', () => {
          it('includes nucleic atom', () => {
            atom.residue._type.flags = ResidueType.Flags.NUCLEIC
            expect(selectors.nucleic().includesAtom(atom)).to.equal(true)
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 300..311
    packages/miew/src/chem/selectors.test.js on lines 313..324
    packages/miew/src/chem/selectors.test.js on lines 326..337
    packages/miew/src/chem/selectors.test.js on lines 356..367
    packages/miew/src/chem/selectors.test.js on lines 369..380
    packages/miew/src/chem/selectors.test.js on lines 382..393
    packages/miew/src/chem/selectors.test.js on lines 408..419
    packages/miew/src/chem/selectors.test.js on lines 421..432
    packages/miew/src/chem/selectors.test.js on lines 434..445

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('ResIdxSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom wich residue index is inside range', () => {
            expect(selectors.residx(rFrom1To14).includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 4 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 137..146
    packages/miew/src/chem/selectors.test.js on lines 201..212

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('SequenceSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom which sequence number is inside range', () => {
            expect(selectors.sequence(rFrom1To14).includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 4 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 137..146
    packages/miew/src/chem/selectors.test.js on lines 228..237

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      describe('SerialSelector', () => {
        describe('#includesAtom(atom)', () => {
          it('includes atom which serial is inside range', () => {
            expect(selectors.serial(rFrom1To14).includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 4 hrs to fix
    packages/miew/src/chem/selectors.test.js on lines 201..212
    packages/miew/src/chem/selectors.test.js on lines 228..237

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

    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

        before(() => {
          selectors.Context.all = selectors.all()
          selectors.Context.noSelector = undefined
          selectors.Context.none = selectors.none()
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 77..81

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

    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

        before(() => {
          selectors.Context.all = selectors.all()
          selectors.Context.noSelector = undefined
          selectors.Context.none = selectors.none()
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 51..55

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

    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

          it('excludes other', () => {
            atom.het = false
            expect(selectors.hetatm().includesAtom(atom)).to.equal(false)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 255..258

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

          it('includes hetatoms', () => {
            atom.het = true
            expect(selectors.hetatm().includesAtom(atom)).to.equal(true)
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 259..262

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 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 2 locations. Consider refactoring.
    Open

          it('inverts true to false', () => {
            expect(selectors.not(selectors.all()).includesAtom(atom)).to.equal(
              false
            )
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 449..453

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

    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

          it('inverts false to true', () => {
            expect(selectors.not(selectors.none()).includesAtom(atom)).to.equal(
              true
            )
          })
    Severity: Major
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 1 hr to fix
    packages/miew/src/chem/selectors.test.js on lines 454..458

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

    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

        it('returns object with correct selector in selector field if input string is correct selection string', () => {
          expect(
            modifiedSelector.default.parse('correctSelString').selector
          ).to.deep.equal(correctSelector)
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 50 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 130..134

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

    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

        it('returns object with correct errorMessage if input string is incorrect selection string', () => {
          expect(
            modifiedSelector.default.parse('incorrectSelString').error
          ).to.deep.equal(errorMessage)
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 50 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 120..124

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

    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

        it('returns selector which corresponds to sent key', () => {
          expect(selectors.GetSelector('all')).to.deep.equal(selectors.all())
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 50 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 69..73

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

    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

        it('returns none selector if key corresponds to undefined or empty value', () => {
          expect(selectors.GetSelector('noSelector')).to.deep.equal(
            selectors.none()
          )
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 50 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 66..68

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        it('returns function for creating selector which corresponds to sent key', () => {
          expect(selectors.keyword('all')).to.deep.equal(selectors.all)
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 40 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 89..91
    packages/miew/src/chem/selectors.test.js on lines 92..94

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        it('returns function for creating None selector if key corresponds to undefined or empty value', () => {
          expect(selectors.keyword('strangeKey')).to.deep.equal(selectors.none)
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 40 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 86..88
    packages/miew/src/chem/selectors.test.js on lines 92..94

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        it('returns function for creating selector which corresponds to sent key in different case', () => {
          expect(selectors.keyword('aLl')).to.deep.equal(selectors.all)
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors.test.js and 2 other locations - About 40 mins to fix
    packages/miew/src/chem/selectors.test.js on lines 86..88
    packages/miew/src/chem/selectors.test.js on lines 89..91

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status