Skip to content

Commit e9e3df2

Browse files
Inegoilya-g
andcommitted
Fix typos and improve grammar in stdlib readmes (JetBrains#2527)
* Fix typos in the main ReadMe.md * Fix typos in the stdlib samples ReadMe.md Co-Authored-By: ilya-g <[email protected]>
1 parent ad8bcda commit e9e3df2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

libraries/stdlib/ReadMe.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ This module creates the [standard library for Kotlin](https://kotlinlang.org/api
44

55
### Notes for contributors
66

7-
We use some code generation to generate the various utility extension function for the various collection-like types like arrays, strings, `Collection<T>`, `Sequence<T>`, `Map<K, V>` etc.
7+
We use code generation to generate utility extension functions for some collection-like types like arrays, strings, `Collection<T>`, `Sequence<T>`, `Map<K, V>` etc.
88

9-
These sources are placed into `generated` folder and their names are prefixed with the underscore, for example `generated/_Collections.kt`
9+
These sources are placed into the `generated` folder and their names are prefixed with an underscore, for example, `generated/_Collections.kt`
1010

11-
To run the code generator use the following command in the root directory of the project:
11+
To run the code generator, use the following command in the root directory of the project:
1212

1313
./gradlew :tools:kotlin-stdlib-gen:run
1414

1515
> Note: on Windows type `gradlew` without the leading `./`
1616
17-
This then runs the script which generates a significant part of stdlib sources from the [templates](../tools/kotlin-stdlib-gen/src/templates) authored with a special kotlin based DSL.
17+
This then runs the script which generates a significant part of stdlib sources from the [templates](../tools/kotlin-stdlib-gen/src/templates) written in a special Kotlin-based DSL.
1818

1919
### Usage samples
2020

21-
If you want to author samples for the standard library, please head to [the samples readme](samples/ReadMe.md).
21+
If you want to author samples for the standard library, please head to [the samples readme](samples/ReadMe.md).

libraries/stdlib/samples/ReadMe.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
This project contains samples for the standard library functions.
44
They are located in the [test](test) source root and each sample is written like a small unit test.
5-
Then these samples are referenced in the documentation of the standard library functions
6-
with the [`@sample`](https://kotlinlang.org/docs/reference/kotlin-doc.html#block-tags) tag and are embedded in the generated documentation as runnable samples.
5+
These samples are referenced in the documentation of the standard library functions
6+
with the [`@sample`](https://kotlinlang.org/docs/reference/kotlin-doc.html#block-tags) tag and embedded in the generated documentation as runnable samples.
77

88

99
### Guides for sample authoring
1010

11-
Note that samples, even though they are written as unit tests, are not conceptually the same as unit tests.
12-
Unlike a unit test, which usually explores corner cases of a function being tested,
11+
Note that samples, although written as unit tests, are conceptually different from them.
12+
While a unit test usually explores corner cases of a function being tested,
1313
the goal of a sample is to show a common use case of a function.
1414

1515
Please see the existing samples for an inspiration on authoring new ones.
@@ -26,15 +26,15 @@ in the template, and then all specializations should be regenerated. See [the st
2626
depending on the specialization.
2727

2828
- Each sample should be self contained, but you can introduce local classes and functions in it.
29-
Do not use external references, other than the Standard Library itself and JDK.
29+
Do not use external references other than the Standard Library itself and JDK.
3030

3131
- Use only the following subset of assertions:
3232

3333
- `assertPrints` to show any printable value,
3434
- `assertTrue`/`assertFalse` to show a boolean value,
3535
- `assertFails` / `assertFailsWith` to show that some invocation will fail.
3636

37-
When a sample is compiled and run during the build these assertions work as usual test assertions.
37+
When a sample is compiled and run during the build, these assertions work as usual test assertions.
3838
When the sample is transformed to be embedded in docs, these assertions are either replaced with `println` with the comment showing its
3939
expected output, or commented out with `//` — this is used for `assertFails` / `assertFailsWith` to prevent execution of its failing block
4040
of code.

0 commit comments

Comments
 (0)