Hi,

This email is on behalf of the community of coala, a Python-based static 
code analysis tool. 
We’re trying to integrate a few features related to .editorconfig files 
into coala. These features require us to parse and generate “.editorconfig” 
files. We would like to collaborate with the editorconfig community to 
develop standard python packages for parsing and generating .editorconfig 
files.

For parsing, we found https://github.com/editorconfig/editorconfig-core-py 
but it doesn’t perform simple parsing. Realizing the editorconfig format is 
similar to “.ini” configuration file format, a prototype implementation of  
“editorconfig” parser adapted from editorconfig-core-py that can be used 
for a more general use by projects like coala is: 
https://github.com/satwikkansal/coala-quickstart/blob/79/coala_quickstart/parsers/editorconfig_parser.py
Similarly, it is possible to create “editorconfig” files programmatically 
using ConfigParser’s capability of writing sections for config files.

With official packages for parsing and creating “.editorconfig”, it would 
be possible for other projects to develop something that utilizes the style 
configurations in the “.editorconfig”, or to generate “.editorconfig” files 
automatically based on some logic. Here’s how coala plans to use these 
libraries:

1. Generating “.editorconfig”  file from the “.coafile” (coala’s 
configuration file): This will allow coala  users to automatically generate 
“.editorconfig" file, so that they are able to use the same style 
preferences as provided by them in the coafile when working in editors that 
editorconfig supports. Related issue: 
https://github.com/coala/coala/issues/4098 .
2. Use the style configurations from “.editorconfig” file: This information 
can be directly used by coala as settings for the static code analysis 
routines and perform a more tailored analysis. Related issue: 
https://github.com/coala/coala-quickstart/issues/79 

Both the above features will help to closely integrate “.coafile” and 
“.editorconfig”. The editor plugins will be able to generate the other if 
one of them is absent. Or if both of the “coafile” and “.editorconfig” 
files are present, the consistency of style preferences could be checked 
and a warning may be raised to the users if they go out of sync. This would 
also allow coala to seamlessly support “.editorconfig” files.

It’d be really nice to have official libraries for generator and parser so 
that the projects utilizing editorconfig don’t have to maintain their own 
custom parser and keep up with upstream changes now and then. 

coala’s community will be more than happy to collaborate in implementing 
libraries for editorconfig. We would like to hear your views and opinions 
on this. If you guys are interested in this project, we can further discuss 
it at our gitter channel: https://gitter.im/coala/coala or in this thread 
as per your convenience. 

Thanks and Regards,
The coala community

-- 
You received this message because you are subscribed to the Google Groups 
"EditorConfig" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/editorconfig.
For more options, visit https://groups.google.com/d/optout.

Reply via email to