200ok-ch/organice

View on GitHub

Showing 459 of 1,494 total issues

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

  client
    .getFileContentsAndMetadata(path)
    .then(({ contents, lastModifiedAt }) => {
      const isDirty = getState().org.present.getIn(['files', path, 'isDirty']);
      const lastServerModifiedAt = parseISO(lastModifiedAt);
Severity: Major
Found in src/actions/org.js and 2 other locations - About 40 mins to fix
src/actions/sync_backend.js on lines 126..141
src/actions/sync_backend.js on lines 155..167

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

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

            <div
              className="table-action-movement__down"
              onClick={() => (selectedTableCellId ? onDownClick() : undefined)}
            >
              <i className="fas fa-arrow-down fa-lg table-action-drawer__main-icon" />
src/components/OrgFile/components/TableEditorModal/components/TableActionButtons/index.js on lines 24..29
src/components/OrgFile/components/TableEditorModal/components/TableActionButtons/index.js on lines 65..70
src/components/OrgFile/components/TableEditorModal/components/TableActionButtons/index.js on lines 71..76
src/components/OrgFile/components/TableEditorModal/components/TableActionButtons/index.js on lines 78..83

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

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

  return {
    type: 'Dropbox',
    isSignedIn,
    getDirectoryListing,
    getMoreDirectoryListing,
Severity: Minor
Found in src/sync_backend_clients/dropbox_sync_backend_client.js and 1 other location - About 40 mins to fix
src/sync_backend_clients/webdav_sync_backend_client.js on lines 133..143

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

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

    testTimestampText('<2021-05-16 Sun +1w>', {
      isActive: true,
      year: '2021',
      month: '05',
      day: '16',
Severity: Minor
Found in src/lib/parse_org.unit.test.js and 1 other location - About 40 mins to fix
src/lib/parse_org.unit.test.js on lines 133..142

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

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

  return {
    type: 'WebDAV',
    isSignedIn,
    getDirectoryListing,
    getMoreDirectoryListing,
Severity: Minor
Found in src/sync_backend_clients/webdav_sync_backend_client.js and 1 other location - About 40 mins to fix
src/sync_backend_clients/dropbox_sync_backend_client.js on lines 216..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 49.

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

    testTimestampText('<2021-05-16 Sun .+1w>', {
      isActive: true,
      year: '2021',
      month: '05',
      day: '16',
Severity: Minor
Found in src/lib/parse_org.unit.test.js and 1 other location - About 40 mins to fix
src/lib/parse_org.unit.test.js on lines 123..132

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

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

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

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

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

Refactorings

Further Reading

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

      expectField('date:today').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 335..344

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

      expectField('date:d').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 335..344
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

                    <div className="col-lg-6">
                      <h4>Do you have further questions?</h4>
                      <p className="lead mb-5 mb-lg-0 text-gray-500">
                        Join the inclusive and friendly community chat, and let's have a talk.
                      </p>
Severity: Major
Found in src/components/Landing/index.js and 3 other locations - About 40 mins to fix
src/components/Landing/index.js on lines 290..293
src/components/Landing/index.js on lines 296..302
src/components/Landing/index.js on lines 304..310

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

                        <div className="col-md-6 mb-4">
                          <h6>Find your content quickly</h6>
                          <p className="mb-2 small mb-0">
                            Thanks to a flexible query language and a bookmarking system, you can
                            find your important content quickly and reliably.
Severity: Major
Found in src/components/Landing/index.js and 3 other locations - About 40 mins to fix
src/components/Landing/index.js on lines 290..293
src/components/Landing/index.js on lines 296..302
src/components/Landing/index.js on lines 481..486

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

      expectField('date:m').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 335..344
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

                        <div className="col-md-6 mb-4">
                          <h6>Work anywhere</h6>
                          <p className="mb-2 small mb-0">
                            organice works on all major platforms, so you can access your
                            information wherever you are.
Severity: Major
Found in src/components/Landing/index.js and 3 other locations - About 40 mins to fix
src/components/Landing/index.js on lines 290..293
src/components/Landing/index.js on lines 304..310
src/components/Landing/index.js on lines 481..486

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

    test('Match two times the same property with different values (see example org)', () => {
      const filterExpr = gprops([
        ['prop1', 'abc'],
        ['prop1', 'def'],
      ]);
Severity: Major
Found in src/lib/headline_filter.unit.test.js and 3 other locations - About 40 mins to fix
src/lib/headline_filter.unit.test.js on lines 64..70
src/lib/headline_filter.unit.test.js on lines 136..142
src/lib/headline_filter.unit.test.js on lines 143..149

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

      expectField('date:w').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 335..344
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

      expectField('date:now').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

      expectField('date:y').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 235..244
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 335..344
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

    test('Match two properties (AND)', () => {
      const filterExpr = gprops([
        ['prop1', 'abc'],
        ['prop2', 'xyz'],
      ]);
Severity: Major
Found in src/lib/headline_filter.unit.test.js and 3 other locations - About 40 mins to fix
src/lib/headline_filter.unit.test.js on lines 64..70
src/lib/headline_filter.unit.test.js on lines 143..149
src/lib/headline_filter.unit.test.js on lines 150..156

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

    test('Match two properties but one is wrong', () => {
      const filterExpr = gprops([
        ['prop1', 'abc'],
        ['prop2', 'xxx'],
      ]);
Severity: Major
Found in src/lib/headline_filter.unit.test.js and 3 other locations - About 40 mins to fix
src/lib/headline_filter.unit.test.js on lines 64..70
src/lib/headline_filter.unit.test.js on lines 136..142
src/lib/headline_filter.unit.test.js on lines 150..156

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

      expectField('date:h').toEqual({
        type: 'date',
        timerange: {
          type: 'point',
          point: {
Severity: Major
Found in src/lib/headline_filter_parser.unit.test.js and 6 other locations - About 40 mins to fix
src/lib/headline_filter_parser.unit.test.js on lines 245..254
src/lib/headline_filter_parser.unit.test.js on lines 255..264
src/lib/headline_filter_parser.unit.test.js on lines 265..274
src/lib/headline_filter_parser.unit.test.js on lines 275..284
src/lib/headline_filter_parser.unit.test.js on lines 335..344
src/lib/headline_filter_parser.unit.test.js on lines 345..354

Duplicated Code

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

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

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

Tuning

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

    test('Match (tag1 OR tag2) AND (tag3 OR tag4)', () => {
      const filterExpr = gtagsOr([
        ['nonexisting', 'spec_tag'],
        ['tag2', 'nonexisting2'],
      ]);
Severity: Major
Found in src/lib/headline_filter.unit.test.js and 3 other locations - About 40 mins to fix
src/lib/headline_filter.unit.test.js on lines 136..142
src/lib/headline_filter.unit.test.js on lines 143..149
src/lib/headline_filter.unit.test.js on lines 150..156

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

Severity
Category
Status
Source
Language