You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-6
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,9 @@ The kind of code we can accept depends on the life cycle for the release you're
36
36
37
37
#### Bug Fix
38
38
39
-
At the end of the commit message, include "Fixes scala/bug#NNNN", where https://github.com/scala/bug/issues/NNNN tracks the bug you're fixing. We also recommend naming your branch after the ticket number.
39
+
At the end of the PR description, which is autofilled with the commit message if there is only one commit, add the phrase, "Fixes scala/bug#NNNN", where `https://github.com/scala/bug/issues/NNNN` tracks the bug you're fixing. Github will turn your bug number into a link.
40
+
41
+
We also recommend naming your branch after the ticket number.
40
42
41
43
Please make sure the ticket's milestone corresponds to the upcoming milestone for the branch your PR targets. The CI automation will automatically assign the milestone after you open the PR.
42
44
@@ -113,8 +115,14 @@ To run a single negative test from sbt shell:
To specify specific flags such as `-deprecation -Xlint -Xfatal-warnings`, you can put them in
117
-
`test/files/neg/<test>.flags`. This could be used to test specific behavior under `-deprecation` flag etc.
118
+
To specify compiler flags such as `-deprecation -Xlint -Xfatal-warnings`, you can add a comment
119
+
at the top of your source file of the form: `// scalac: -deprecation -Xlint -Xfatal-warnings`.
120
+
121
+
To test that no warnings are emitted, use `-Xfatal-warnings`. That will fail a `pos` test if there
122
+
are warnings. Note that `pos` tests do not have `.check` files.
123
+
124
+
To test that warnings are correctly emitted, use `-Xfatal-warnings` with a `neg` test and `.check` file.
125
+
The usual way to create a `.check` file is `partest --update-check`.
118
126
119
127
To run all tests in `neg` categories from sbt shell:
120
128
@@ -154,8 +162,8 @@ root> partest --help
154
162
Partests are compiled by the `quick` compiler (and `run` partests executed with the `quick` library),
155
163
and therefore:
156
164
157
-
* if you're working in the compiler, you must write a partest, or a `BytecodeTest` JUnit test which invokes the compiler programmatically; however
158
-
* if you're working in the library, a JUnit and/or ScalaCheck is better.
165
+
* if you're working on the compiler, you must write a partest, or a `BytecodeTest` JUnit test which invokes the compiler programmatically; however
166
+
* if you're working on the library, a JUnit and/or ScalaCheck is better.
159
167
160
168
#### exploring with REPL
161
169
@@ -213,7 +221,9 @@ by the commit on the code base, so use the active voice and the
213
221
present tense. That also makes the commit subjects easy to reuse in
214
222
release notes.
215
223
216
-
For a bugfix, the end of the commit message should say "Fixes scala/bug#NNNN".
224
+
For a bugfix, the end of the PR description (that is, the first comment on the PR) should say, "Fixes scala/bug#NNNN", as mentioned above.
225
+
226
+
NOTE: it's best not to add the issue reference to your commit message, as github will pollute the conversation on the ticket with notifications every time you commit.
217
227
218
228
If a commit purely refactors and is not intended to change behaviour,
0 commit comments