snowplow/snowplow-javascript-tracker

View on GitHub

Showing 199 of 352 total issues

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-form-tracking/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-debugger/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-error-tracking/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-enhanced-consent/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-optimizely/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-ad-tracking/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-timezone/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

export default [
  // CommonJS (for Node) and ES module (for bundlers) build.
  {
    input: './src/index.ts',
    plugins: [...umdPlugins, banner()],
Severity: Major
Found in plugins/browser-plugin-optimizely-x/rollup.config.js and 25 other locations - About 1 day to fix
plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
plugins/browser-plugin-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-media/rollup.config.js on lines 44..67
plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

function generatePrimitives(
  contextPrimitives: Array<ContextPrimitive> | ContextPrimitive,
  event: PayloadBuilder,
  eventType: string,
  eventSchema: string
Severity: Major
Found in libraries/tracker-core/src/contexts.ts and 1 other location - About 1 day to fix
libraries/tracker-core/src/contexts.ts on lines 679..697

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

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

function generateConditionals(
  providers: Array<ConditionalContextProvider> | ConditionalContextProvider,
  event: PayloadBuilder,
  eventType: string,
  eventSchema: string
Severity: Major
Found in libraries/tracker-core/src/contexts.ts and 1 other location - About 1 day to fix
libraries/tracker-core/src/contexts.ts on lines 610..628

Duplicated Code

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

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

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

Tuning

This issue has a mass of 223.

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

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

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

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

Refactorings

Further Reading

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

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
Severity: Major
Found in common/scripts/install-run-rush.js and 1 other location - About 1 day to fix
common/scripts/install-run.js on lines 4..14

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

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

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

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

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

Refactorings

Further Reading

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

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
Severity: Major
Found in common/scripts/install-run.js and 1 other location - About 1 day to fix
common/scripts/install-run-rush.js on lines 4..14

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

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

export function trackRemoveFromCart(
  cart: Cart & CommonEcommerceEventProperties,
  trackers: Array<string> = Object.keys(_trackers)
) {
  const { context = [], timestamp, products = [], ...cartAttributes } = cart;
Severity: Major
Found in plugins/browser-plugin-snowplow-ecommerce/src/api.ts and 1 other location - About 7 hrs to fix
plugins/browser-plugin-snowplow-ecommerce/src/api.ts on lines 165..176

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

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

export function trackAddToCart(
  cart: Cart & CommonEcommerceEventProperties,
  trackers: Array<string> = Object.keys(_trackers)
) {
  const { context = [], timestamp, products = [], ...cartAttributes } = cart;
Severity: Major
Found in plugins/browser-plugin-snowplow-ecommerce/src/api.ts and 1 other location - About 7 hrs to fix
plugins/browser-plugin-snowplow-ecommerce/src/api.ts on lines 184..195

Duplicated Code

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

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

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

Tuning

This issue has a mass of 192.

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

export interface MediaPlayer extends Record<string, unknown> {
  /** The current playback time position within the media in seconds */
  currentTime: number;
  /** A double-precision floating-point value indicating the duration of the media in seconds */
  duration?: number | null;
Severity: Major
Found in plugins/browser-plugin-media/src/types.ts and 1 other location - About 6 hrs to fix
plugins/browser-plugin-media/src/types.ts on lines 261..292

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

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

export interface MediaPlayerUpdate {
  /** The current playback time position within the media in seconds */
  currentTime?: number;
  /** A double-precision floating-point value indicating the duration of the media in seconds */
  duration?: number | null;
Severity: Major
Found in plugins/browser-plugin-media/src/types.ts and 1 other location - About 6 hrs to fix
plugins/browser-plugin-media/src/types.ts on lines 227..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 171.

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

export function buildAdClick(event: AdClickEvent): PayloadBuilder {
  const { targetUrl, clickId, costModel, cost, bannerId, zoneId, impressionId, advertiserId, campaignId } = event;
  const eventJson = {
    schema: 'iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0',
    data: removeEmptyProperties({
Severity: Major
Found in libraries/tracker-core/src/core.ts and 1 other location - About 6 hrs to fix
libraries/tracker-core/src/core.ts on lines 1005..1023

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

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

export function buildAdConversion(event: AdConversionEvent): PayloadBuilder {
  const { conversionId, costModel, cost, category, action, property, initialValue, advertiserId, campaignId } = event;
  const eventJson = {
    schema: 'iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0',
    data: removeEmptyProperties({
Severity: Major
Found in libraries/tracker-core/src/core.ts and 1 other location - About 6 hrs to fix
libraries/tracker-core/src/core.ts on lines 947..965

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

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

export function setEcommerceUser(context: UserContext, trackers: Array<string> = Object.keys(_trackers)) {
  const { id, is_guest, email } = context;
  trackers.forEach((trackerId) => {
    if (_context[trackerId]) {
      _context[trackerId] = removeContext(_context[trackerId], USER_SCHEMA);
Severity: Major
Found in plugins/browser-plugin-snowplow-ecommerce/src/api.ts and 1 other location - About 6 hrs to fix
plugins/browser-plugin-snowplow-ecommerce/src/api.ts on lines 273..289

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

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

export function setPageType(context: PageContext, trackers: Array<string> = Object.keys(_trackers)) {
  const { type, language, locale } = context;
  trackers.forEach((trackerId) => {
    if (_context[trackerId]) {
      _context[trackerId] = removeContext(_context[trackerId], PAGE_SCHEMA);
Severity: Major
Found in plugins/browser-plugin-snowplow-ecommerce/src/api.ts and 1 other location - About 6 hrs to fix
plugins/browser-plugin-snowplow-ecommerce/src/api.ts on lines 297..313

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

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