Hi all,

With help from Daniel, Tyler and Andrew, both tools are now in jenkins-infra 
<https://github.com/jenkins-infra> with a job in CI 
<https://ci.jenkins-ci.org/view/Infrastructure/>

You can now see the list of unused methods in Jenkins api at:
https://ci.jenkins-ci.org/view/Infrastructure/job/infra_unused-code-detector/lastSuccessfulBuild/artifact/target/output.html

And the deprecated api used for each plugin is now at:
https://ci.jenkins-ci.org/view/Infrastructure/job/infra_deprecated-usage-in-plugins/lastSuccessfulBuild/artifact/target/output.html
The list of deprecated api which is probably not used in plugins is at:
https://ci.jenkins-ci.org/view/Infrastructure/job/infra_deprecated-usage-in-plugins/lastSuccessfulBuild/artifact/target/output.html#deprecatedApiNotUsed

I hope that it can help to reduce complexity in Jenkins api and perhaps fix 
bugs.

Happy new year !
Emeric


Le mardi 22 décembre 2015 12:46:07 UTC+1, evernat a écrit :
>
> Thanks for the kind words Oleg, Andrew and Baptiste.
>
> While waiting for the unused code detector 
> <https://github.com/evernat/unused-code-detector> to be eventually forked 
> into jenkins-infra <https://github.com/jenkins-infra> with a job in CI 
> <https://ci.jenkins-ci.org/view/Infrastructure/> (I suggest a daily 
> schedule),
> I have created a job in another jenkins and you can see the result of this 
> unused code detector at:
>
> https://javamelody.ci.cloudbees.com/job/unused-code-detector/lastSuccessfulBuild/artifact/target/output.html
> (191 unused methods. The result is updated weekly.)
>
> bye,
> Emeric
>
>
> Le jeudi 17 décembre 2015 13:32:58 UTC+1, Baptiste Mathus a écrit :
>>
>> +1 thanks and congrats Emeric!
>>
>> Gonna use it to make the plugins I maintain disappear from this list 
>> (using deprecated code) :-).
>>
>> 2015-12-14 13:49 GMT+01:00 Andrew Bayer <[email protected]>:
>>
>>> Yeah. This is really fascinating stuff - thanks for the work!
>>>
>>>
>>> On Monday, December 14, 2015, Oleg Nenashev <[email protected]> wrote:
>>>
>>>> Hi Emeric,
>>>>
>>>> Thanks a lot for your efforts! +1 from me for forking the additional 
>>>> tool.
>>>>
>>>> Since we plan to add the API deprecation and removal policy in Jenkins 
>>>> 2.0, such tools should become very important in the middle-term.
>>>>
>>>> Best regards,
>>>> Oleg
>>>>
>>>> понедельник, 14 декабря 2015 г., 2:07:14 UTC+3 пользователь evernat 
>>>> написал:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> After the tool to find the deprecated Jenkins api used by plugins 
>>>>> <https://ci.jenkins-ci.org/view/Infrastructure/job/infra_deprecated-usage-in-plugins/ws/target/output.html>,
>>>>>  
>>>>> I have written yet another tool.
>>>>> The unused code detector 
>>>>> <https://github.com/evernat/unused-code-detector> finds Jenkins 
>>>>> methods unused in Jenkins and in latest plugins, including potential 
>>>>> usage 
>>>>> in jelly. (Getters, setters, do*, deprecated methods and unit tests are 
>>>>> ignored. Unused deprecated api is already reported here 
>>>>> <https://ci.jenkins-ci.org/view/Infrastructure/job/infra_deprecated-usage-in-plugins/ws/target/output.html#deprecatedApiNotUsed>
>>>>> .)
>>>>>
>>>>> Current result is that 184 Jenkins methods are never used. Perhaps, 
>>>>> some of them could be deprecated or removed right away.
>>>>> There are certainly false positives in the report, but I think that a 
>>>>> majority is really dead code. To be sure that a method is never used, 
>>>>> it's 
>>>>> possible to grep all sources 
>>>>> <https://wiki.jenkins-ci.org/display/JENKINS/Grepping+all+sources> or 
>>>>> to search in github 
>>>>> <https://github.com/search?type=Code&q=user%3Ajenkinsci+SomeClass.staticMethod>
>>>>>  
>>>>> directly.
>>>>>
>>>>> If you are ok, the tool could be forked into jenkins-infra 
>>>>> <https://github.com/jenkins-infra> with a job in CI 
>>>>> <https://ci.jenkins-ci.org/view/Infrastructure/> (If yes, I suggest a 
>>>>> daily schedule.)
>>>>>
>>>>> By the way, I have fixed a bug in the first tool above, there are in 
>>>>> fact 560 plugins using a deprecated Jenkins api, not 430.
>>>>>
>>>>> bye,
>>>>> Emeric
>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Jenkins Developers" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-dev/7c5f8267-a91d-4ddd-b853-fe49e79711f7%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/7c5f8267-a91d-4ddd-b853-fe49e79711f7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/CAPbPdOZbqDs8JaNcPq4A%3DLsgM%3Dv%2BSKqOgCj%3D5e53oYv3jWQ12Q%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/CAPbPdOZbqDs8JaNcPq4A%3DLsgM%3Dv%2BSKqOgCj%3D5e53oYv3jWQ12Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Baptiste <Batmat> MATHUS - http://batmat.net
>> Sauvez un arbre,
>> Mangez un castor !
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/e3385b98-d26a-4d69-9520-22753ae175c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to