Skip to content

Commit 644d0d2

Browse files
committed
style: Format code
1 parent 9e88e3a commit 644d0d2

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

Docs/Contributing.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ Our recommended order is:
9797

9898
If you do not know what to work on, you can find bugs and features we are interested in fixed/adding here:
9999

100-
* [Confirmed bugs](https://bugs.launchpad.net/or/+bugs?orderby=-importance&field.status%3Alist=TRIAGED)
101-
* [Accepted feature requests (anything in an N.M or N.x list)](https://trello.com/b/DS2h3Pxc/open-rails-roadmap)
100+
- [Confirmed bugs](https://bugs.launchpad.net/or/+bugs?orderby=-importance&field.status%3Alist=TRIAGED)
101+
- [Accepted feature requests (anything in an N.M or N.x list)](https://trello.com/b/DS2h3Pxc/open-rails-roadmap)
102102

103103
If multiple things are interesting to you, we would prefer that you choose the item with the highest priority to us - a higher importance or heat in Launchpad bugs and lowest version number in Trello cards.
104104

@@ -110,8 +110,8 @@ All of the main Open Rails code is C# and your contribution is expected to also
110110

111111
Code is expected to follow the [Framework Design Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/) throughout, especially the [Naming Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines), with few exceptions:
112112

113-
* Structures, fields, and enums defining file format components may be named exactly as in the file format
114-
* Public and protected fields are allowed, although care must be taken with public fields
113+
- Structures, fields, and enums defining file format components may be named exactly as in the file format
114+
- Public and protected fields are allowed, although care must be taken with public fields
115115

116116
Code style (placement of braces, etc.) is expected to follow the default Visual Studio rules; the [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions) provides a good basis for many aspects of this.
117117

@@ -133,19 +133,19 @@ All fixed values used in formula must be placed in a constant, with a name and u
133133

134134
Open Rails is a multi-threaded application, which presents some additional complexity. There are four key threads to be aware of:
135135

136-
* Loader
137-
* Updater
138-
* Render
139-
* Sound
136+
- Loader
137+
- Updater
138+
- Render
139+
- Sound
140140

141141
Data that is operated only on one thread for its lifetime does not need special attention. However, any data that is operated on by multiple threads - even if only one thread is writing - needs special care and attention.
142142

143143
For each object stored in a field or property that is accessed from multiple threads, the root, you must:
144144

145-
* Never modify the contents of the objects within the root (such as adding or removing items from a List<T>)
146-
* Always copy the root object into a local variable before doing anything else with it
147-
* Update the root object by (as above) copying into a local, cloning/making a new version from the old version, and finally storing into the root
148-
* If multiple threads can update the root, the final store into root must be done using an interlocked compare-and-exchange with a loop in case of failure
145+
- Never modify the contents of the objects within the root (such as adding or removing items from a List<T>)
146+
- Always copy the root object into a local variable before doing anything else with it
147+
- Update the root object by (as above) copying into a local, cloning/making a new version from the old version, and finally storing into the root
148+
- If multiple threads can update the root, the final store into root must be done using an interlocked compare-and-exchange with a loop in case of failure
149149

150150
If you are in any doubt about the use of data by multiple threads, or your implementation of the above rules, please ask in the [Elvas Tower](http://www.elvastower.com/) forums.
151151

@@ -157,8 +157,8 @@ Your code should be fixing exactly one bug or adding a single new feature; mixin
157157

158158
When your pull request is draft or ready for review, it will not be included in any version of Open Rails unless:
159159

160-
* You are a member of the core team
161-
* A member of the core team adds a particular label
160+
- You are a member of the core team
161+
- A member of the core team adds a particular label
162162

163163
If your pull request satisfies the above criteria, it will be automatically included in the Unstable Version (unless there are merge conflicts).
164164

@@ -170,9 +170,9 @@ When we start preparing for a new Stable Version, all code in the Testing Versio
170170

171171
When you're done writing code, you should make a pull request on GitHub from your fork's branch back to the official repository's "master" branch. The title and description of the requests should concisely indicate what bug or feature you've implemented and you will need to include links to whichever of the following are appropriate:
172172

173-
* Bug report
174-
* Road-map card
175-
* Blueprint
173+
- Bug report
174+
- Road-map card
175+
- Blueprint
176176

177177
## How bugs and features are accepted
178178

@@ -196,20 +196,20 @@ A member of [our management team](https://launchpad.net/~orsupervisors/+members)
196196

197197
If you are reviewing someone else's code for Open Rails, you will need to ensure that they have met the above "Making changes" guidelines as best as possible. This will necessitate, at minimum:
198198

199-
* Check for linked bug report or feature request
200-
* Check bug report is triaged, and feature request is approved
201-
* For a bug report, it should have status "Triaged"
202-
* For a road-map card, it should be in an N.M or N.x list
203-
* For a blueprint, it should have direction "Approved"
204-
* Read through all of the changes to the code
205-
* Check that all new code follows the requirements:
206-
* General (including naming)
207-
* Architecture
208-
* Physics
209-
* Multi-threading
210-
* Be sure that all of the changes are necessary
211-
* Be sure that no changes are missing
212-
* Be on the lookout for data being access across threads
199+
- Check for linked bug report or feature request
200+
- Check bug report is triaged, and feature request is approved
201+
- For a bug report, it should have status "Triaged"
202+
- For a road-map card, it should be in an N.M or N.x list
203+
- For a blueprint, it should have direction "Approved"
204+
- Read through all of the changes to the code
205+
- Check that all new code follows the requirements:
206+
- General (including naming)
207+
- Architecture
208+
- Physics
209+
- Multi-threading
210+
- Be sure that all of the changes are necessary
211+
- Be sure that no changes are missing
212+
- Be on the lookout for data being access across threads
213213

214214
### Leeway when reviewing
215215

@@ -219,8 +219,8 @@ You should take extra care when reviewing first-time and new contributors, to en
219219

220220
For all contributions that deviate from the guidelines, there are a few approaches you can take:
221221

222-
* Politely and constructively suggest changes on the pull request (if possible, include the desired code)
223-
* Make the changes yourself (GitHub provides instructions to push changes to other people's pull requests)
224-
* Accept the code as-is, leaving a note for how to improve for the next pull request
222+
- Politely and constructively suggest changes on the pull request (if possible, include the desired code)
223+
- Make the changes yourself (GitHub provides instructions to push changes to other people's pull requests)
224+
- Accept the code as-is, leaving a note for how to improve for the next pull request
225225

226226
It is expected that most contributors will quickly correct their code based on feedback, either in the same pull request or subsequent ones, depending on the path taken above. However, if a contributor continues to not meet the same part of the guidelines, you are free to become more strict with them - it's still helpful to suggest the corrected code, but do not feel obliged to spend time helping the same person with the same part of the guidelines repeatedly.

0 commit comments

Comments
 (0)