loomio/loomio

View on GitHub

Showing 212 of 471 total issues

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

export default class DiscussionReaderRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = DiscussionReaderModel;
    this.baseConstructor(recordStore);
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class TaskRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = TaskModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/task_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class StanceRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = StanceModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/stance_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class ContactMessageRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = ContactMessageModel;
    this.baseConstructor(recordStore);
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class WebhookRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = WebhookModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/webhook_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10

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

export default class DiscussionTemplateRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = DiscussionTemplateModel;
    this.baseConstructor(recordStore);
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class PollOptionRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = PollOptionModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/poll_option_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class ChatbotRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = ChatbotModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/chatbot_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class SessionRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = SessionModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/session_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class RegistrationRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = RegistrationModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/registration_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class ContactRequestRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = ContactRequestModel;
    this.baseConstructor(recordStore);
vue/src/shared/interfaces/attachment_records_interface.js on lines 4..10
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

export default class AttachmentRecordsInterface extends BaseRecordsInterface {
  constructor(recordStore) {
    super(recordStore);
    this.model = AttachmentModel;
    this.baseConstructor(recordStore);
Severity: Major
Found in vue/src/shared/interfaces/attachment_records_interface.js and 16 other locations - About 40 mins to fix
vue/src/shared/interfaces/chatbot_records_interface.js on lines 4..10
vue/src/shared/interfaces/comment_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_message_records_interface.js on lines 4..10
vue/src/shared/interfaces/contact_request_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_reader_records_interface.js on lines 4..10
vue/src/shared/interfaces/discussion_template_records_interface.js on lines 4..10
vue/src/shared/interfaces/outcome_records_interface.js on lines 4..10
vue/src/shared/interfaces/poll_option_records_interface.js on lines 4..10
vue/src/shared/interfaces/reaction_records_interface.js on lines 4..10
vue/src/shared/interfaces/received_email_records_interface.js on lines 4..10
vue/src/shared/interfaces/registration_records_interface.js on lines 4..10
vue/src/shared/interfaces/session_records_interface.js on lines 4..10
vue/src/shared/interfaces/stance_records_interface.js on lines 4..10
vue/src/shared/interfaces/tag_records_interface.js on lines 4..10
vue/src/shared/interfaces/task_records_interface.js on lines 4..10
vue/src/shared/interfaces/webhook_records_interface.js on lines 4..10

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

  relationships() {
    this.belongsTo('event');
    this.belongsTo('user');
    this.belongsTo('actor', {from: 'users'});
  }
Severity: Minor
Found in vue/src/shared/models/notification_model.js and 1 other location - About 40 mins to fix
vue/src/shared/models/membership_model.js on lines 23..27

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

  relationships() {
    this.belongsTo('group');
    this.belongsTo('user');
    this.belongsTo('inviter', {from: 'users'});
  }
Severity: Minor
Found in vue/src/shared/models/membership_model.js and 1 other location - About 40 mins to fix
vue/src/shared/models/notification_model.js on lines 27..31

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

  def self.create(discussion_template:, actor:)
    actor.ability.authorize! :create, discussion_template

    discussion_template.assign_attributes(author: actor)

Severity: Minor
Found in app/services/discussion_template_service.rb and 1 other location - About 35 mins to fix
app/services/poll_template_service.rb on lines 50..63

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

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

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

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

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

Refactorings

Further Reading

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

  def self.create(poll_template:, actor:)
    actor.ability.authorize! :create, poll_template

    poll_template.assign_attributes(author: actor)

Severity: Minor
Found in app/services/poll_template_service.rb and 1 other location - About 35 mins to fix
app/services/discussion_template_service.rb on lines 2..15

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

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

  approve(membershipRequest) {
    return this.remote.postMember(membershipRequest.id, 'approve', {group_key: membershipRequest.group().key});
  }
vue/src/shared/interfaces/membership_request_records_interface.js on lines 33..35

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

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

      this.addRule({
        name: "context updated",
        local: {
          find: {
            id: this.discussion.createdEvent().id
Severity: Minor
Found in vue/src/shared/loaders/thread_loader.js and 1 other location - About 35 mins to fix
vue/src/shared/loaders/thread_loader.js on lines 315..322

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

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 this.recordStore.memberships.collection.find({groupId: {$in: this.parentOrSelf().selfAndSubgroupIds()}});
Severity: Minor
Found in vue/src/shared/models/group_model.js and 1 other location - About 35 mins to fix
vue/src/shared/models/membership_model.js on lines 51..51

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

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

        this.recordStore.discussions.collection.find({ groupId: { $in: this.group().organisationIds() } }).forEach(discussion => discussion.update({discussionReaderVolume: null}));
Severity: Minor
Found in vue/src/shared/models/membership_model.js and 1 other location - About 35 mins to fix
vue/src/shared/models/group_model.js on lines 179..179

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

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