Skip to content

Commit d30df3b

Browse files
committed
Merge pull request #1 from scala/2.11.x
Merge 2.11 fork
2 parents 76c982e + 648c7a1 commit d30df3b

File tree

413 files changed

+3807
-1445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+3807
-1445
lines changed

.gitattributes

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
# this must be first so later entries will override it
33
* text=auto
44

5+
# check out text files with lf, not crlf, on Windows. (especially
6+
# important for Scala source files, since """ preserves line endings)
7+
text eol=lf
8+
59
# These files are text and should be normalized (convert crlf => lf)
6-
*.c text
7-
*.check text
8-
*.css text
9-
*.flags text
10-
*.html text
11-
*.java text
12-
*.js text
13-
*.policy text
14-
*.sbt text
15-
*.scala text
16-
*.sh text
17-
*.txt text
18-
*.xml text
10+
*.c eol=lf
11+
*.check eol=lf
12+
*.css eol=lf
13+
*.flags eol=lf
14+
*.html eol=lf
15+
*.java eol=lf
16+
*.js eol=lf
17+
*.policy eol=lf
18+
*.sbt eol=lf
19+
*.scala eol=lf
20+
*.sh eol=lf
21+
*.txt eol=lf
22+
*.xml eol=lf
1923

2024
# Windows-specific files get windows endings
2125
*.bat eol=crlf

CONTRIBUTING.md

Lines changed: 83 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,93 @@ Please make sure the JIRA ticket's fix version corresponds to the upcoming miles
3838

3939
#### Enhancement or New Feature
4040

41-
For longer-running development, likely required for this category of code contributions, we suggest you include "topic" or "wip" in your branch name, to indicate that this is work in progress, and that others should be prepared to rebase if they branch off your branch.
41+
For longer-running development, likely required for this category of code contributions, we suggest you include "topic/" or "wip/" in your branch name, to indicate that this is work in progress, and that others should be prepared to rebase if they branch off your branch.
4242

4343
Any language change (including bug fixes) must be accompanied by the relevant updates to the spec, which lives in the same repository for this reason.
4444

4545
A new language feature requires a SIP (Scala Improvement Process) proposal. For more details on submitting SIPs, see [how to submit a SIP](http://docs.scala-lang.org/sips/sip-submission.html).
4646

47-
#### Summary
47+
## Guidelines
4848

49-
1. We require regression tests for bug fixes. New features and enhancements must be supported by a respectable test suite.
50-
2. Documentation. Yep! Also required :-)
51-
3. Please follow these standard code standards, though in moderation (scouts quickly learn to let sleeping dogs lie):
52-
- Not violate [DRY](http://programmer.97things.oreilly.com/wiki/index.php/Don%27t_Repeat_Yourself).
53-
- [Boy Scout Rule](http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule) should be applied.
49+
Here is some advice on how to craft a pull request with the best possible
50+
chance of being accepted.
5451

55-
Please also have a look at our [Pull Request Policy](https://github.com/scala/scala/wiki/Pull-Request-Policy), as well as the [Scala Hacker Guide](http://www.scala-lang.org/contribute/hacker-guide.html) by @xeno-by.
52+
### Tests
53+
54+
Bug fixes should include regression tests -- in the same commit as the fix.
55+
56+
If testing isn't feasible, the commit message should explain why.
57+
58+
New features and enhancements must be supported by a respectable test suite.
59+
60+
Some characteristics of good tests:
61+
62+
* includes comments: what is being tested and why?
63+
* be minimal, deterministic, stable (unaffected by irrelevant changes), easy to understand and review
64+
* have minimal dependencies: a compiler bug test should not depend on, e.g., the Scala library
65+
66+
### Documentation
67+
68+
This is of course required for new features and enhancements.
69+
70+
Any API additions should include Scaladoc.
71+
72+
Consider updating the package-level doc (in the package object), if appropriate.
73+
74+
### Coding standards
75+
76+
Please follow these standard code standards, though in moderation (scouts quickly learn to let sleeping dogs lie):
77+
78+
* Don't violate [DRY](http://programmer.97things.oreilly.com/wiki/index.php/Don%27t_Repeat_Yourself).
79+
* Follow the [Boy Scout Rule](http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule).
80+
81+
Please also have a look at the [Scala Hacker Guide](http://www.scala-lang.org/contribute/hacker-guide.html) by @xeno-by.
82+
83+
### Clean commits, clean history
84+
85+
A pull request should consist of commits with messages that clearly state what problem the commit resolves and how.
86+
87+
Commit logs should be stated in the active, present tense.
88+
89+
A commit's subject should be 72 characters or less. Overall, think of
90+
the first line of the commit as a description of the action performed
91+
by the commit on the code base, so use the active voice and the
92+
present tense. That also makes the commit subjects easy to reuse in
93+
release notes.
94+
95+
For a bugfix, the title must look like "SI-NNNN - don't crash when
96+
moon is in wrong phase".
97+
98+
If a commit purely refactors and is not intended to change behaviour,
99+
say so.
100+
101+
Backports should be tagged as "[backport]".
102+
103+
When working on maintenance branches (e.g., 2.11.x), include "[nomerge]"
104+
if this commit should not be merged forward into the next release
105+
branch.
106+
107+
Here is standard advice on good commit messages:
108+
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
109+
110+
### Pass Scabot
111+
112+
Our pull request bot, Scabot, automatically builds all the commits in a PR individually. (All, so we can `git bisect` later.)
113+
114+
Click on the little x next to a commit sha to go to the overview of the PR validation job. To diagnose a failure, consult the console output of the job that failed.
115+
116+
See the [scala-jenkins-infra repo](https://github.com/scala/scala-jenkins-infra) and [Scabot repo](https://github.com/scala/scabot) for full details on PR validation. One tip you should know is that commenting `/rebuild` on a PR asks validation to be run again on the same commits. This is only necessary when a spurious failure occurred.
117+
118+
### Pass code review
119+
120+
Your PR will need to be assigned to one or more reviewers. You can suggest reviewers yourself; if you're not sure, see the list in [README.md](README.md) or ask on scala-internals.
121+
122+
To assign a reviewer, add a "review by @reviewer" to your PR description.
123+
124+
NOTE: it's best not to @mention in commit messages, as github pings you every time a commit with your @name on it shuffles through the system (even in other repos, on merges,...).
125+
126+
A reviewer gives the green light by commenting "LGTM" (looks good to me).
127+
128+
A review feedback may be addressed by pushing new commits to the request, if these commits stand on their own.
129+
130+
Once all these conditions are met, and we agree with the change (we are available on scala-internals to discuss this beforehand, before you put in the coding work!), we will merge your changes.

0 commit comments

Comments
 (0)