-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/check code duplication #19
base: master
Are you sure you want to change the base?
Conversation
My only fear is that we will start to have several loose variables on
We can also install it on the docker image we use, then we don't have to wait for the installation on every build Also:
|
Oh, forgot about remembering you to add a TODO/Pending here update README before finishing this PR |
Dangerfile
Outdated
|
||
def run_cpd_on_target_branch | ||
`git clone --depth 1 #{@ssh} --branch #{@target_branch} target-branch` | ||
`pmd cpd --language #{@language} --minimum-tokens #{@minimum_tokens} --files target-branch/#{@directory} --ignore-identifiers | grep tokens | wc -l`.to_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be remove target-branch
afterwards to avoid garbage on local runs
43c96f7
to
49373df
Compare
b37edd8
to
f225238
Compare
41e14d2
to
dc4f5ba
Compare
b17a27c
to
f443aff
Compare
f443aff
to
234c98d
Compare
234c98d
to
3c2bc0f
Compare
3c2bc0f
to
9f0f671
Compare
9f0f671
to
f2fb7cc
Compare
For now we have this setup:
Dangerfile
:@minimum_tokens, @language, @directory, @ssh, @target_branch
pmd
:- brew install pmd
in.travis.yml
- brew install pmd
in Jenkins script configurationI am testing danger features here, the last warning is from CPD.
Depending on project CPD can turn in a bottleneck because it clones the repo to do comparison between feature branch and target branch. Here we can see that
danger
was executed in 41 seconds with CPD on this repo but I know that there are some huge repos (1GB+) 😕So what you guys think about this approach @felipesabino @melloflavio
Pending:
pmd
on docker imagetarget-branch
) to avoid garbage on local runspmd
is not present on current buildREADME
list with this check