3 - [Getting help](#getting-help-)
4 - [Submitting bug reports](#submitting-bug-reports-)
5 - [Contributing code](#contributing-code-)
7 ## Getting help [^](#how-to-contribute)
9 Community discussion, questions, and informal bug reporting is done on the
10 [CodeMirror Google group](http://groups.google.com/group/codemirror).
12 ## Submitting bug reports [^](#how-to-contribute)
14 The preferred way to report bugs is to use the
15 [GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before
16 reporting a bug, read these pointers.
18 **Note:** The issue tracker is for *bugs*, not requests for help. Questions
19 should be asked on the
20 [CodeMirror Google group](http://groups.google.com/group/codemirror) instead.
22 ### Reporting bugs effectively
24 - CodeMirror is maintained by volunteers. They don't owe you anything, so be
25 polite. Reports with an indignant or belligerent tone tend to be moved to the
28 - Include information about **the browser in which the problem occurred**. Even
29 if you tested several browsers, and the problem occurred in all of them,
30 mention this fact in the bug report. Also include browser version numbers and
31 the operating system that you're on.
33 - Mention which release of CodeMirror you're using. Preferably, try also with
34 the current development snapshot, to ensure the problem has not already been
37 - Mention very precisely what went wrong. "X is broken" is not a good bug
38 report. What did you expect to happen? What happened instead? Describe the
39 exact steps a maintainer has to take to make the problem occur. We can not
40 fix something that we can not observe.
42 - If the problem can not be reproduced in any of the demos included in the
43 CodeMirror distribution, please provide an HTML document that demonstrates
44 the problem. The best way to do this is to go to
45 [jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and
46 include the resulting link in your bug report.
48 ## Contributing code [^](#how-to-contribute)
50 - Make sure you have a [GitHub Account](https://github.com/signup/free)
51 - Fork [CodeMirror](https://github.com/marijnh/CodeMirror/)
52 ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
54 - If your changes are easy to test or likely to regress, add tests.
55 Tests for the core go into `test/test.js`, some modes have their own
56 test suite under `mode/XXX/test.js`. Feel free to add new test
57 suites to modes that don't have one yet (be sure to link the new
58 tests into `test/index.html`).
59 - Follow the general code style of the rest of the project (see
60 below). Run `bin/lint` to verify that the linter is happy.
61 - Make sure all tests pass. Visit `test/index.html` in your browser to
63 - Submit a pull request
64 ([how to create a pull request](https://help.github.com/articles/fork-a-repo))
68 - 2 spaces per indentation level, no tabs.
69 - Include semicolons after statements.
70 - Note that the linter (`bin/lint`) which is run after each commit
71 complains about unused variables and functions. Prefix their names
72 with an underscore to muffle it.