Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address 'Code Clone Detection' results #933

Closed
mrlacey opened this issue Aug 11, 2017 · 10 comments
Closed

Address 'Code Clone Detection' results #933

mrlacey opened this issue Aug 11, 2017 · 10 comments
Assignees
Labels
Can Close Out Soon Work relating to this issue has been completed.
Milestone

Comments

@mrlacey
Copy link
Collaborator

mrlacey commented Aug 11, 2017

The 'Code Clone Detection' functionality in VSEnt highlights some areas where we can improve the generator code base.

I see 705 lines of Cloned Code.

Some of the duplication in test code might not be worth removing but there's strong evidence of someone having abused cut-and-paste when it comes to other code.

@mrlacey mrlacey added this to the Backlog milestone Oct 4, 2017
@crutkas
Copy link
Member

crutkas commented Jun 28, 2018

Think this may be a good idea to do.

@sibille
Copy link
Collaborator

sibille commented Jun 28, 2018

ok!

@sibille sibille modified the milestones: Backlog, 2.3 Jun 28, 2018
@sibille sibille self-assigned this Jul 3, 2018
@sibille sibille modified the milestones: 2.3, 2.4 Jul 31, 2018
@sibille
Copy link
Collaborator

sibille commented Jul 31, 2018

eliminated the exact matches, moving to 2.4 for the rest

@sibille sibille modified the milestones: 2.4, 2.5 Aug 30, 2018
@crutkas
Copy link
Member

crutkas commented Oct 19, 2018

is this a tracked item for this release?

@sibille
Copy link
Collaborator

sibille commented Oct 22, 2018

I'd prefer to do this on 3.0 branch

@crutkas crutkas modified the milestones: 2.5, 3.0 Oct 23, 2018
@crutkas
Copy link
Member

crutkas commented Oct 23, 2018

lower priority due to wizard code, lets do in 3.0

Are we doing the test on generated projects as well?

@mrlacey
Copy link
Collaborator Author

mrlacey commented Oct 23, 2018

Are we doing the test on generated projects as well?

As we aim to only have minimal, necessary, code in the generated projects and the generated code should be easy to understand, I would not expect any clones to be found. If any were found, removing the duplication would likely make the generated code harder to read/understand.

@sibille sibille added the in-progress The issue is currently being actively worked on. label Jan 10, 2019
@crutkas
Copy link
Member

crutkas commented Jan 15, 2019

lets just do a sanity check for generated projects but i do agree we chances are this would be a low chance we would dup code per your statement @mrlacey

@dgomezc
Copy link
Collaborator

dgomezc commented Jan 17, 2019

We have refactored the duplicated code in the UI and Core projects, and some cases that we thought convenient in the tests. We have ignored the rest of the duplicated code in the tests (adding .codeclonesettings files) since they are initializations and we think it is more understandable that way.

In the generated projects, there is only duplicated code when adding Ink Pages, since the initializations of the services are very similar, and in a configuration method of the CameraControl, which contains 2 similar switch statements. We think that the code is easier to understand as it is, so we think there is no action to take here.

@dgomezc dgomezc added Can Close Out Soon Work relating to this issue has been completed. and removed in-progress The issue is currently being actively worked on. labels Jan 17, 2019
@sibille
Copy link
Collaborator

sibille commented Jan 22, 2019

verified in dev

@sibille sibille closed this as completed Jan 22, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Can Close Out Soon Work relating to this issue has been completed.
Projects
None yet
Development

No branches or pull requests

5 participants