GSOC Project: Implement aspect to coala

12 views
Skip to first unread message

Adhika Setya Pramudita

unread,
May 16, 2017, 8:47:27 AM5/16/17
to coala-devel
Hello coalaians!

I am Adhika, currently a Information Technology Bachelor at University Gadjah Mada, Indonesia. This summer I was fortunate enough to became part of GSOC with coala, which is to implement aspect to coala with help of Stefan (@userzimmerman), Steven (@myint), and John (@jayvdb) as my mentors.


About this project

This project will aim to implement aspect based configuration (as proposed on cEP-0005) on coala. Currently, coala run analysis over a project by specifying list of bears that user want to run. With aspect, we abstract those process with specifying list of aspect and coala will automatically choose the required bear to run. The advantage for this approach is user doesn't need to know various bear and how to use them, also the process to configure one language is not too different with other language (for example, coafile for project written Python and C).

aspect itself is a category of analysis that should be run over a code.Each aspect have a taste, which is a measurable metric on how a "correct" code should look like.  For example, LineLength is aspect that analyse the length of each line in code and its have max_length as taste to specify the maximum length of a line.

This project have close relationship with another GSOC project, Convert bears to use aspects, which will convert existing bears on coala so it could be run under aspect based approach. In this project, I will focus on implementing the required feature on the coala core itself.


Approach

I have 3 main step to successfully implement this project:

1) aspect based configuration

Define new option and variable that could be used on coafile to define list of aspect and taste that user want to run over the project.

2) Bear picking strategy

Implement required algorithm to pick list of bear based on required aspect on coafile. This involve collecting all bears metadata to read its capability and prioritizing picking by few criteria like choosing bear that could fix the problem (not only detect), minimizing number of individual bears, and minimizing different runtime environment of external linter bear.

3) Documentation, depreciation, and testing

Writing or updating documentation on how aspect work and how to write new configuration file. Also I plan to do an integration test that will run coala with new aspect based configuration and the old one over an example project and compare the result.



And that is the general idea about my project. If you have any input please contact me :D

Reply all
Reply to author
Forward
0 new messages