Skip to content

Commit 44c54a7

Browse files
committed
docs: cleaning up CONTRIBUTING.md
1 parent 473e239 commit 44c54a7

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

CONTRIBUTING.md

+21-20
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Found a bug? Take these steps:
1616

1717
# Feature Request
1818

19-
If you think there's something missing in Spectrum that is a good candidate to become a feature of the framework, please
19+
If you think there's something missing in Spectrum that is a good candidate to become a new feature, please
2020
[open a feature request](https://github.com/giulong/spectrum/issues/new?assignees=giulong&labels=&projects=&template=feature-request.md&title=%5BRFE%5D+%3CProvide+a+short+title%3E)
2121
by fulfilling the provided template.
2222

@@ -25,25 +25,25 @@ by fulfilling the provided template.
2525
If you found something missing in the [docs](https://giulong.github.io/spectrum/#spectrum),
2626
or you want to contribute with real configuration examples of how you use Spectrum, feel free to open a Pull Request.
2727

28-
> ⚠ Minor changes such as fixing typos or rewriting the current docs will not be accepted.
28+
> Minor changes such as fixing typos or rewriting the current docs will be rejected.
2929
3030
# Discussions
3131

32-
If you just want to ask something about Spectrum, either to maintainers or to other users, check the
32+
If you just want to ask something about Spectrum, either to maintainers or other users, check the
3333
[Discussions section](https://github.com/giulong/spectrum/discussions)
3434
to see if there's something on that topic already. If not, feel free to open a new one.
3535

3636
# Submitting Changes
3737

38-
> ⚠ Purely cosmetic changes, such as just fixing whitespaces or formatting code, will not be accepted.
38+
> Purely cosmetic changes, such as just fixing whitespaces or formatting code, will not be accepted.
3939
> Neither refactoring will.
4040
4141
If you'd like to actively contribute to Spectrum, whether it's source code or documentation, take these steps:
4242

4343
1. First of all, be sure to read the [DEV.md](DEV.md) to be able to build Spectrum and its docs locally
4444
2. [Fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
4545
3. Checkout a `feature/*`, `bugfix/*`, or `docs/*` branch with a short and meaningful name
46-
4. Make your changes and be sure you have a successful local build (at least the framework-only build)
46+
4. Make your changes and be sure you have a successful local build (at least the _framework-only_ build)
4747
5. Be sure your code complies to the [Coding Conventions](#coding-conventions)
4848
6. Submit a Pull Request towards `develop`
4949

@@ -62,9 +62,9 @@ Do's:
6262

6363
* be [SOLID](https://en.wikipedia.org/wiki/SOLID)
6464
* Take a look around: your code should follow the conventions already in place
65-
* Write small classes and methods, with reusability and evolvability in mind
65+
* Write small classes and methods, with reusability and maintainability in mind
6666
* Leverage [convention over configuration](https://en.wikipedia.org/wiki/Convention_over_configuration), providing defaults to reduce the boilerplate code a user would need to explicitly write
67-
* Explicitly mark variables as final. Mutable variables are not accepted, with very few exceptions
67+
* Explicitly mark variables as `final`. Mutable variables are not accepted, with very few exceptions
6868
* Leverage Java 21 api
6969
* Lines up to 180 chars are ok, with a grain of salt: put methods-chained calls on a new line only if they're many
7070
* Write few meaningful logs at a proper level
@@ -85,33 +85,34 @@ Don'ts:
8585
Every line of code must be unit-tested. There's no reason not to do so.
8686
If you write conditional logic, be sure you test each branch.
8787
You can leverage the coverage report produced by the build at [docs/jacoco/index.html](docs/jacoco/index.html)
88-
to see what's missing. Keep in mind that coverage is an important way to check missing branches, not just as an empty number.
88+
to see what's missing. Keep in mind that coverage _per se_ is just an empty number, but it's an important way to check missing branches.
8989

9090
Rules:
9191

92-
* Each class must:
92+
* Each test class must:
9393
* be in the same package of its source counterpart
9494
* have a name that is made up of the **source** class' name + 'Test', such as `MySourceClass` → `MySourceClassTest`
95-
* Each method must:
96-
* be `public void`
95+
* Each test method must:
96+
* be package-private
9797
* have a short and clear `@DisplayName`
98-
* not contain any conditional logic
99-
* Strict mocking is required, as per mockito's default
100-
* Use dummy values as arguments. Suggestion: if you have a method with an argument like `String fileName`, use a variable like `String fileName = "fileName";` in your test
98+
* contain no conditional logic
99+
* Strict mocking is required, as per mockito's default, with few exceptions allowed
100+
* Use dummy values as arguments. Suggestion: if you have a method with an argument like `String fileName`, use a variable with name and value matching,
101+
like `String fileName = "fileName";`
101102
* Avoid generic argument matchers such as `any()` when possible. Knowing what we're passing to methods calls matter, even if they're dummy values
102103

103104
### Integration Tests
104105

105-
Integration tests are not always needed. They are, for example, when implementing a new feature that produce some kind of artifact, such as a report.
106+
Integration tests are not always needed. They are, for example, when implementing a new feature that produces some kind of artifact, such as a report.
106107
In that case, we need an integration test that checks that artifact, and provide a way to avoid regressions.
107108

108-
Generally speaking, you can write integration tests if you think they're useful, but maybe it's **better asking** before wasting time.
109+
Generally speaking, you can write integration tests if you think they're useful, but maybe it's **better asking** before wasting your time.
109110

110111
Rules:
111112

112-
* Each class must:
113+
* Each test class must:
113114
* have a name that ends with 'IT', such as `ExtentReportVerifierIT`
114-
* Each method must:
115-
* be `public void`
115+
* Each test method must:
116+
* be package-private
116117
* have a short and clear `@DisplayName`
117-
* not contain any conditional logic
118+
* contain no conditional logic

0 commit comments

Comments
 (0)