Skip to content

Commit 3414ea6

Browse files
committed
Tutorial.rst: Doc on ConfigGenerator
This adds documentation on how to generate config files using config generator tool Related to coala/coala#6049
1 parent 7ce97cd commit 3414ea6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Diff for: Users/Tutorial.rst

+41
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,47 @@ But don't stop reading - you don't have to enter all those values again!
129129
We have given coala the ``--save`` argument, which means that it will
130130
automatically generate a ``.coafile`` into the current directory. Read on!
131131

132+
Generation of configuration files based on style guides
133+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134+
135+
coala can automatically generate a configuration file
136+
for you based on your preference of languages and style
137+
guides.
138+
139+
If you want to generate a configuration file for python
140+
language based on pep8 style guide you can execute
141+
142+
::
143+
144+
$ coala -g python:pep8:app.py
145+
146+
This will generate a .coafile for you by which you can lint
147+
your app.py file bases on pep8 style guide.
148+
149+
The general syntax for the command is
150+
151+
::
152+
153+
$ coala -g language:style_guide:files
154+
155+
You can also use this tool to generate a configuration
156+
file for different languages at the same time
157+
158+
::
159+
160+
$ coala -g python:pep8:app.py html:google:index.html
161+
162+
This command will generate a .coafile for linting
163+
your app.py according to pep8 guidelines and your
164+
index.html according to google style guidelines.
165+
166+
Sometimes you may want to inherit certain files to
167+
all the sections. This can be done by executing
168+
169+
::
170+
171+
$ coala -g language:style_guide:files --files style_to_lint
172+
132173
Configuration Files - coafiles
133174
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134175

0 commit comments

Comments
 (0)