Skip to content

Commit 5fd9f67

Browse files
committed
Remove code snippets in contribution guidelines
Signed-off-by: onox <[email protected]>
1 parent d429d7a commit 5fd9f67

File tree

1 file changed

+26
-50
lines changed

1 file changed

+26
-50
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#### **Did you find a bug?**
44

55
* **Ensure the bug was not already reported** by searching on GitHub
6-
under [Issues](https://github.com/onox/json-ada/issues).
6+
under the Issues page.
77

88
* If you're unable to find an open issue addressing the problem,
9-
[open a new one](https://github.com/onox/json-ada/issues/new). Be sure to
9+
open a new issue. Be sure to
1010
include a **title and clear description**, as much relevant information
1111
as possible, and labels.
1212

@@ -44,7 +44,7 @@ and making backporting fixes harder.
4444
#### **Branches**
4545

4646
* Make sure that your branch name starts with the issue number and contains
47-
only a few words in lower case. For example: `5-performance`.
47+
only a few words in lower case. For example: `1-performance`.
4848

4949
* Make sure that each commit contains one logical change. Do not add
5050
commits that only fix whitespace, formatting, or typo's. Instead amend
@@ -69,6 +69,10 @@ and making backporting fixes harder.
6969

7070
#### **Commit messages**
7171

72+
* Prefix the first line of your commit message with (for example) `foo: `
73+
if applicable. See previous commits to see whether the project regularly
74+
uses prefixes in commit messages.
75+
7276
* Make sure each line is at most 72 characters. If necessary, leave the
7377
second line blank and write a more detailed explanation starting on the
7478
third line. Wrap the message manually to 72 characters so that you don't
@@ -82,6 +86,9 @@ and making backporting fixes harder.
8286
* See [this blog post](https://chris.beams.io/posts/git-commit/) on how
8387
to write good commit messages.
8488

89+
* Add a `Signed-off-by` with `git commit -s` to sign the
90+
[Developer Certificate of Origin](#developer-certificate-of-origin) below.
91+
8592
#### **Coding style**
8693

8794
* Make sure your changes do not cause the compiler to fail with any new
@@ -93,54 +100,25 @@ and making backporting fixes harder.
93100
next line, and UNIX line endings.
94101

95102
* If you add a subprogram with many parameters, put the parameters on the
96-
next line and try to align the `:`, like this:
97-
98-
```ada
99-
function Parse
100-
(Stream : aliased in out Streams.Stream'Class;
101-
Allocator : aliased in out Types.Memory_Allocator) return Types.JSON_Value;
102-
```
103-
104-
If the subprogram header is less than about 90 characters, then you can
103+
next line and try to align the `:`.
104+
If the subprogram header is less than about 90 characters, then you may
105105
keep it all on one line.
106106

107-
* If you add aspects, indent `with` by 2 spaces, unless the parameters
108-
are already on separate lines:
109-
110-
```ada
111-
function Read_Character (Object : in out Stream) return Character
112-
with Post'Class => not Stream'Class (Object).Has_Buffered_Character;
113-
```
114-
115-
and:
116-
117-
```ada
118-
function Read_Character
119-
(Object : in out Stream;
120-
Index : out AS.Stream_Element_Offset) return Character
121-
with Post'Class => not Stream'Class (Object).Has_Buffered_Character;
122-
```
123-
124-
* If you add declarations to the declarative part of a subprogram's body,
125-
put the `is` keyword on a separate line if the parameters are on separate
126-
lines as well:
127-
128-
```ada
129-
procedure Read_Token
130-
(Stream : in out Streams.Stream'Class;
131-
Next_Token : out Token;
132-
Expect_EOF : Boolean := False)
133-
is
134-
C : Character;
135-
use Ada.Characters.Latin_1;
136-
begin
137-
```
138-
139-
If the declarative part is empty, then place `is` after the parameters
140-
or return type.
107+
* If you add aspects, indent `with` by 2 spaces. If the parameters
108+
are on separate lines then indent by zero spaces.
109+
110+
* Put the `is` keyword on a separate line if the parameters are on separate
111+
lines *and* the declarative part is not empty. Otherwise place `is` after
112+
the parameters or return type.
141113

142114
* In general, try to follow the coding style of the surrounding code.
143115

116+
#### Licensing
117+
118+
* Each file should contain an `SPDX-License-Identifier` tag and a license
119+
header. Contributions created in whole by you should be licensed under
120+
the main license of the project, as specified in the [README][url-readme].
121+
144122
## Developer Certificate of Origin
145123

146124
By making a contribution to this project, I certify that:
@@ -153,7 +131,7 @@ knowledge, is covered under an appropriate open source license and I have
153131
the right under that license to submit that work with modifications,
154132
whether created in whole or in part by me, under the same open source
155133
license (unless I am permitted to submit under a different license), as
156-
Indicated in the file; or
134+
indicated in the file; or
157135

158136
(c) The contribution was provided directly to me by some other person who
159137
certified (a), (b) or (c) and I have not modified it.
@@ -164,6 +142,4 @@ information I submit with it, including my sign-off) is maintained
164142
indefinitely and may be redistributed consistent with this project or
165143
the open source license(s) involved.
166144

167-
## License
168-
169-
This project is licensed under the Apache License 2.0.
145+
[url-readme]: /README.md

0 commit comments

Comments
 (0)