lundi 18 novembre 2019

How to develop automation tool that refactors the code automatically [on hold]

Very often developers write code and miss to apply standard coding practices. For ex. take Java for reference. We can initialize HashMap like below:

Map<String, Object> map = new HashMap<String, Object>();

However, with Java version 1.8+, the type specification in constructor is not required, and below is the better approach to initialize HashMap in Java.

Map<String, Object> map = new HashMap<>();

I would like to develop a tool that detects such issues in Java files and automatically fix the problem as explained above. Once correct code is generated by tool, a git PR can be created for review.

I would appreciate if folks here help me design such system.

Aucun commentaire:

Enregistrer un commentaire