From 07276bce599118431a15f3ae95a73c93c3c478a8 Mon Sep 17 00:00:00 2001 From: PrajwalM2212 Date: Thu, 15 Aug 2019 17:01:27 +0530 Subject: [PATCH] Tutorial.rst: Doc on ConfigGenerator This adds documentation on how to generate config files using config generator tool Related to https://github.com/coala/coala/pull/6049 --- Users/Tutorial.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Users/Tutorial.rst b/Users/Tutorial.rst index 9202be5c..b3ec89f6 100644 --- a/Users/Tutorial.rst +++ b/Users/Tutorial.rst @@ -129,6 +129,47 @@ But don't stop reading - you don't have to enter all those values again! We have given coala the ``--save`` argument, which means that it will automatically generate a ``.coafile`` into the current directory. Read on! +Generation of configuration files based on style guides +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +coala can automatically generate a configuration file +for you based on your preference of languages and style +guides. + +If you want to generate a configuration file for python +language based on pep8 style guide you can execute + +:: + + $ coala -g python:pep8:**.py + +This will generate a .coafile for you by which you can lint +all your python files based on pep8 style guide. + +The general syntax for the command is + +:: + + $ coala -g language:style_guide:files:excludes + +You can also use this tool to generate a configuration +file for different languages at the same time + +:: + + $ coala -g python:pep8:app.py html:google:index.html + +This command will generate a .coafile for linting +your app.py according to pep8 guidelines and your +index.html according to google style guidelines. + +Sometimes you may want to inherit certain files to +all the sections. This can be done by executing + +:: + + $ coala -g language:style_guide:files --files style_to_lint + Configuration Files - coafiles ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~