File: CONTRIBUTING.md

package info (click to toggle)
swift-mode 9.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: lisp: 13,883; sh: 59; makefile: 43
file content (67 lines) | stat: -rw-r--r-- 2,057 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributing

Contributions are welcome. If you discover bugs or issues, or have ideas for
improvements or new features, please file a report on the issue tracker for this
repository. Follow the guidelines below to make sure everything goes smoothly.

## Issue reporting

- Check that the issue has not already been reported
- Check that the issue has not already been fixed in the latest code
- Open an issue with a clear title
- Use concise English.
- Use code as our common language.
    - An example is worth a thousand words. For example:

      > It should be indented like this:
      ```swift
      guard
        var x = xx else {
          foo()
          foo()
      }
      ```
      > But actually it is indented like this:
      ```swift
      guard
        var x = xx else {
            foo()
            foo()
        }
      ```
    - A link to the language specification or other project is also worth a
      thousand words. For example, “I want this feature (links to a elisp
      function of other project)”.

## Pull requests

- Perform all changes on a topic branch for easier merging
- Follow the coding conventions already in use
- Verify Emacs Lisp code with `checkdoc`
- Add unit tests whenever possible
- Run `make test` and ensure no errors other than known-bugs.
- Open a [pull request](https://help.github.com/articles/using-pull-requests)
  relating to a single issue.

## Coding Conventions

### Naming

Use a `swift-mode:` prefix.

### Docstrings

Write meaningful docstrings for all functions and vars.

- Document all functions and variables as directed by `checkdoc`.
- Consider using [Flycheck](https://github.com/flycheck/flycheck) to automate
  `checkdoc` while you're editing.

### Common Lisp functions

Use `cl-lib` instead of `cl`. The `cl` library pollutes the global namespace and
its usage is therefore discouraged.

- Use `cl-lib`, which adds prefixes to all cl function names
- Use [noflet](https://github.com/nicferrier/emacs-noflet) instead of `flet`
  when you need to dynamically rebind functions.