OrganizationManager
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type OrganizationManager struct {
*Management
}
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (m *OrganizationManager) AssignMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error) {
body := struct {
Roles []string `json:"roles"`
}{
Roles: roles,
- Read upRead up
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 115.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (m *OrganizationManager) DeleteMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error) {
body := struct {
Roles []string `json:"roles"`
}{
Roles: roles,
- Read upRead up
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 115.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (m *OrganizationManager) AddMembers(id string, memberIDs []string, opts ...RequestOption) (err error) {
body := struct {
Members []string `json:"members"`
}{
Members: memberIDs,
- Read upRead up
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 108.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (m *OrganizationManager) DeleteMember(id string, memberIDs []string, opts ...RequestOption) (err error) {
body := struct {
Members []string `json:"members"`
}{
Members: memberIDs,
- Read upRead up
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 108.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
exported type OrganizationList should have comment or be unexported Open
type OrganizationList struct {
- Exclude checks
exported type OrganizationConnectionDetails should have comment or be unexported Open
type OrganizationConnectionDetails struct {
- Exclude checks
comment on exported method OrganizationManager.AddMembers should be of the form "AddMembers ..." Open
// Add members to an organization
- Exclude checks
comment on exported method OrganizationManager.UpdateConnection should be of the form "UpdateConnection ..." Open
// Modify an enabled_connection belonging to an Organization
- Exclude checks
exported type OrganizationMember should have comment or be unexported Open
type OrganizationMember struct {
- Exclude checks
comment on exported method OrganizationManager.CreateInvitation should be of the form "CreateInvitation ..." Open
// Create invitations to organization
- Exclude checks
comment on exported method OrganizationManager.Members should be of the form "Members ..." Open
// List organization members
- Exclude checks
comment on exported method OrganizationManager.AssignMemberRoles should be of the form "AssignMemberRoles ..." Open
// Assign one or more roles to a given user that will be applied in the context of the provided organization
- Exclude checks
exported type OrganizationMemberList should have comment or be unexported Open
type OrganizationMemberList struct {
- Exclude checks
comment on exported method OrganizationManager.ReadByName should be of the form "ReadByName ..." Open
// Get a specific organization by name
- Exclude checks
comment on exported method OrganizationManager.MemberRoles should be of the form "MemberRoles ..." Open
// Get the roles assigned to an organization member
- Exclude checks
exported type OrganizationInvitationInviter should have comment or be unexported Open
type OrganizationInvitationInviter struct {
- Exclude checks
exported type OrganizationInvitationInvitee should have comment or be unexported Open
type OrganizationInvitationInvitee struct {
- Exclude checks
comment on exported method OrganizationManager.Invitation should be of the form "Invitation ..." Open
// Get an invitation to organization
- Exclude checks
exported type Organization should have comment or be unexported Open
type Organization struct {
- Exclude checks
exported type OrganizationConnection should have comment or be unexported Open
type OrganizationConnection struct {
- Exclude checks
exported type OrganizationConnectionList should have comment or be unexported Open
type OrganizationConnectionList struct {
- Exclude checks
comment on exported method OrganizationManager.DeleteInvitation should be of the form "DeleteInvitation ..." Open
// Delete an invitation to organization
- Exclude checks
comment on exported method OrganizationManager.AddConnection should be of the form "AddConnection ..." Open
// Add connections to an organization
- Exclude checks
exported type OrganizationMemberRole should have comment or be unexported Open
type OrganizationMemberRole struct {
- Exclude checks
comment on exported method OrganizationManager.Connections should be of the form "Connections ..." Open
// Get connections enabled for an organization
- Exclude checks
comment on exported method OrganizationManager.Connection should be of the form "Connection ..." Open
// Get an enabled connection for an organization
- Exclude checks
comment on exported method OrganizationManager.Invitations should be of the form "Invitations ..." Open
// Get invitations to organization
- Exclude checks
comment on exported method OrganizationManager.DeleteMember should be of the form "DeleteMember ..." Open
// Delete members from an organization
- Exclude checks
exported type OrganizationBranding should have comment or be unexported Open
type OrganizationBranding struct {
- Exclude checks
exported type OrganizationInvitation should have comment or be unexported Open
type OrganizationInvitation struct {
- Exclude checks
exported type OrganizationInvitationList should have comment or be unexported Open
type OrganizationInvitationList struct {
- Exclude checks
exported type OrganizationManager should have comment or be unexported Open
type OrganizationManager struct {
- Exclude checks
comment on exported method OrganizationManager.DeleteConnection should be of the form "DeleteConnection ..." Open
// Delete connections from an organization
- Exclude checks
comment on exported method OrganizationManager.DeleteMemberRoles should be of the form "DeleteMemberRoles ..." Open
// Remove one or more roles from a given user in the context of the provided organization
- Exclude checks
exported type OrganizationMemberRoleList should have comment or be unexported Open
type OrganizationMemberRoleList struct {
- Exclude checks
comment on exported method OrganizationManager.Update should be of the form "Update ..." Open
// Modify an organization
- Exclude checks