Google Summer of Code 2018 Work Product Submission



coala

Kilari Teja

I am Kilari Teja, a final year student of Computer Science Engineering at Guru Gobind Singh Indraprastha University, located in Delhi, India. I have been a GSoC’18 student for coala working on bringing coala to code editors via language server protocol. My projects makes it possible for linting and fixing code to be performed right from the code editor using coala.


Patches Tarball


SHA-256:

05b19a721e6fb995a7f6eee9af57e170fb894dc9aae4684ad417bcf47c1f746c

Bonding

Phase 1

Phase 2

Phase 3


Links to commits and repositories I've worked on:

Repository Link to Commit/s Description
p  projects View

coala-language-server.md: Update project details

c  cEPs View

cEP-0028: Optimizing coala for language server

s  solar/shortlinks View

Fix wiki link template

s  solar/shortlinks View

Fix misconfigured endpoints

c  coala-vs-code View

langserver.py: Update to use jsonrpc

c  coala-ls-gsoc View

tests: Add test helpers and resources

c  coala-ls-gsoc View

coalals.utils.log: Add log configuration

c  coala-ls-gsoc View

coalals.interface: Add initial coala wrapper

c  coala-ls-gsoc View

coalals.results: Add result processing module

c  coala-ls-gsoc View

coalals.langserver: Add language server module

c  coala-ls-gsoc View

coalals.main: Add main.py

c  coala-ls-gsoc View

test-requirements.txt: Update test requirements

c  coala-ls-gsoc View

requirements.txt: Update requirements

c  coala-ls-gsoc View

Update test configuration

c  coala-ls-gsoc View

coala-ls.sh: Add coala-ls.sh

c  coala-ls-gsoc View

README: Update README.md and assets

c  coala-ls-gsoc View

.coafile: Update config and globs

c  coala-ls-gsoc View

perf-metrics.md: Add performance metrics

c  coala-ls-gsoc View

coalals.results: Refactor to submodule

c  coala-ls-gsoc View

requirements.txt: coalals.utils.files: Add get_disk_contents()

c  coala-ls-gsoc View

requirements.txt: Add whatthepatch

c  coala-ls-gsoc View

coalals.results.fixes: Add fixes parsing & lsp models

c  coala-ls-gsoc View

coalals.results.diagnostics: Support fixes collection

c  coala-ls-gsoc View

coalals.langserver: Add support for textDocument/formatting

c  coala-ls-gsoc View

coalals.langserver: Add support for showMessageRequest

c  coala-ls-gsoc View

coalals.results.diagnostics: Support fixes collection

c  coala-ls-gsoc View

coalals.results.diagnostics: Support fixes collection

c  coala-ls-gsoc View

perf-metrics.md: Update perf-metrics for Phase-2

c  coala-vs-code View

Fix single line docstring

c  coala-vs-code View

.codecov.yml: Increase test coverage target

c  coala-vs-code View

Update to jsonrpc lib

c  coala-vs-code View

README.md: Update README.md

c  coala-vs-code View

Add lint & fix typescript linting issues

c  coala-vs-code View

Update server invoke script

c  coala-vs-code View

extension.ts: Add internal coala-ls config

c  coala-vs-code View

extension.ts: Add debug flag to invocation mode

c  coala-vs-code View

extension.ts: Support extension configuration

c  coala-vs-code View

extension.ts: Drop unnecessary file watching

c  coala-vs-code View

package.json: Update client version

c  coala-vs-code View

Update dependencies to TS 2.0

c  coala-vs-code View

extension.test.ts: Add extension test

c  coala-vs-code View

.travis.yml: Add travis configuration

c  coala-vs-code View

extension.ts: Update list of supported langs

c  coala View

filters: Add support for Section Filtering

c  coala View

filters: Update filters to new API

c  coala View

SectionTagsFilter: Add SectionTagsFilter

c  coala View

FileProxies: Add FileProxy and related classes

c  coala View

FileProxies: Support FileProxies

c  coala-ls-gsoc View

requirements.txt: Update to bleeding edge coala

c  coala-ls-gsoc View

SectionFilters: Support section filters

c  coala-ls-gsoc View

FileProxies: Support analysis of in-memory files

c  coala-ls-gsoc View

Support status editor messages


coala language server

Work Done

The power of coala can now be directly leveraged from within the code editor. coalals was written to support language server protocol, an editor independent protocol for source code processors such as linters and fixers. My project involved building a language server based exposing coala, an editor (VS Code) plugin and optimizing coala core to better support coalals. The following is a break down of all the work done:

  1. coala-ls
    • Supports open, save, change, publishDiagnostics, format, showMessage, shutdown request types.
    • Supports limited code fixing.
    • Supports concurrent analysis cycles and management.
    • Supports all file types supported by coala core.
    • Supports sending UI message when coala core behaves unexpectedly.
    • Supports section filtering based on tags.
  2. coala-vs-code
    • Supports using coala from VS Code.
    • Supports all file types supported by coala.
    • Supports limited set of extension customization using VS Code settings.
    • Published on Store.
  3. coala
    • Supports section filtering.
    • Supports section filtering by tags.
    • Supports analysis of coala on in-memory files (FileProxies).

Challenges

Working on my project was not always a smooth ride. I had to work on three different pieces of technology, one for each phase and care about how they would work together. I already had some experience working with language servers but TypeScript and VS Code Plugin Development was quite new to me. But, thanks to the referable work done previously on my project, this got a lot easier. I also had some problems dealing with code structuring and reviews but by I eventually learned proper git etiquettes.

Work to be done

Although most of the said goals have been achieved, much is left to be done in order to make coalals even more efficient and improve the user experience. I think that given enough dev time coalals can be improved to be a very efficient way to use coala. The following is a break down of what I think is possible and should be done:

  1. coala
    • Support Apply Actions on FileProxies, this would make it possible to extend complete code fixing support for coalals.
  2. coala-ls
    • Pip release to make installing coalals easier.
    • Support for custom section tags via editor configuration instead of default tags.
  3. coala-vs-code
    • CD System to make delivery of plugin builds streamlined.
    • More extension customization options like custom tags.