I am Pareksha Manchanda, currently a 2nd year Computer Science student in University Institute of Engineering and Technology, Panjab University, Chandigarh. My GSoC journey with coala has taught me the importance of keeping code neat and clean. I worked on aspects which is more or less the future of coala.
ed967dcd98bfcd617e2a3238025b622e12665789e4d707e5b7c4bcf97ebcdf25
Copy Hash valueRepository | Link to Commit/s | Description | |
c | cEPs | View | cEP-0010.md: Update to match existing aspects |
c | coala | View | Formatting: Describe |
c | coala | View | aspects.root: Override |
c | coala | View | aspects: Create |
c | coala | View | Language: Change |
c | coala | View | Tcl: Create basic language file for tcl |
c | coala | View | m4: Create basic language file for m4 |
c | coala | View | VisualBasic: Create language file for Visual Basic |
c | coala | View | PowerShell: Create language file for PowerShell |
c | coala | View | .gitlab-ci.yml: Add Python 3.6 to GitLab CI |
c | coala | View | .gitlab-ci.yml: Add Python 3.7 to GitLab CI |
c | coala | View | languages: Allow more than one comment delimiter |
c | coala-utils | View | setup.py: Sync moban, replace |
c | coala-utils | View | position_is_escaped: Let escape char other than |
c | coala-bears | View | ClangComplexityBear: Fix AttributeError |
c | coala | View | aspects: Rename class |
c | coala | View | VisualBasic: Add |
c | coala | View | languages: Add missing language imports |
c | coala | View | languages: Implement |
c | coala | View | aspects: Default languages=all when using aspects |
c | coala | View | LocalBearTestHelper: Modify for |
c | coala-bears | View | LineLengthBear: Migrate to aspects |
c | coala-bears | View | PycodestyleBear: Migrate bear to aspects |
c | coala | View | language: Add |
c | cEPs | View | cEP-0010.md: Add |
c | coala | View | Formatting: Add taste |
coala provides coala-bears
as a tool for linting and fixing code. These bears are nothing but
tools for cleaning code, serving different purposes.
For now coala-bears
are run on code by name of bears. This project is part of adding the aspect
functionality to some of these coala-bears
. Through this functionality coala users will no
longer have to worry about searching for the bear or remembering the name of the bear appropriate
for their work. They will be able to fix their code by running coala by the name of an aspect
,
which is nothing but a keyword that relates to the action they want the bear to perform on their
code.
This GSoC project led to the migration of two bears, LineLengthBear
and PycodestyleBear
into
their respective aspects along with implementation of tests for the same. Apart from this, aspects
core is enhanced with bug fixes and some of the feature limitations have been overcome.
Project work consists of adding bug fixes and enhancements to aspects
library and adding support
for aspect testing in VerifyLocalBearTestHelper
on coala/coala.
Two bears, namely LineLengthBear
and PycodestyleBear
have been migrated to their respective
aspects along with tests, ensuring their proper functionality in
coala/coala-bears.
Work done also includes an attempt to migrate QuotesBear
to it’s respective aspects. In the
process, it was found that it needed new aspects to be defined and enhancements to be made in the
coala Language
library for working on these aspects. Work for adding new aspects for the
QuotesBear
has been going on in
aspects cEP but it’s progress had been slow due to
limitations in the Language
library. To overcome these limitations, work has been going on for
enhancing Language
library. It includes
converting comment_delimiter
to comment_delimiters
so that it supports a tuple allowing multiple escape characters and the same enhancement of
allowing escape character to be other than \
was made in coala/coala-utils as well. Another enhancement
was letting the string_delimiter_escape
add on to the language definitions. New language
files of Tcl, m4, Visual Basic and PowerShell were also added in the coala Language
library
along with their respective delimiter escapes for strings.
Adding to the PR’s merged in this project, some unseen bugs and feature limitations were found and issues for the same were created. These issues include -
comment_delimiters
Linter
module for aspects supportFormatting
aspect of the doctestsuggested_values
or replace it with allowed_values
unescape
support escape_char other than \
unescaped_search_for
to pass escape char to position_is_escaped
unescaped_strip
and unescaped_rstrip
to pass escape char to position_is_escaped
There are areas in coala core which are alien to aspects. For example, there’s @linter
which
is totally alien to aspects. During the migration of PycodestyleBear
into aspects, we realised
we needed aspect support in Linter
module so that it passes the related aspect
with the result.
But thankfully at the last moment, we figured another way out and successfully migrated the bear.
Another challange was dealing with the QuotesBear
and overcoming the limitations of Languages
library. But thanks to the combined efforts of me and my mentors, we were able to get into the
root problems, file issues for these and even successfully solve some of these.
Work to be done includes working on the new issues filed and the bugs found during this project,
including defining new aspects and tastes, starting with the idea of aspects defined in
cEP itself. These issues, PRs’ and the QuotesBear
migration attempt would definitely become the foundation of the next aspects project.
Adding to already filed issues, there may be feature limitations in aspects core and lack of
support of aspects in some areas of coala core. These limitations/bugs can only be found and thus
fixed if we migrate more and more coala bears to aspects. The need of every bear to be migrated
will lead to enhancement of aspect core and addition of new aspect definitions. Thus, more
migration work is required along with side-by-side enhancements in aspects
library.
In this project, migration of PEP8Bear
was also scheduled but due to some line length bug
in the PEP8
tool itself, the migration was blocked.
As soon as the bug gets resolved,
PEP8Bear
PR can be resumed.