rspec/rules/S4347/highlighting.adoc

16 lines
595 B
Plaintext
Raw Permalink Normal View History

=== Highlighting
When the random number generator's output **is not** predictable by default:
* The most recent function call that sets a seed. For example:
- The factory method that returns the RNG, where the seed is passed as a parameter.
- The RNG constructor, where the seed is a parameter.
- The function call on the RNG that sets the seed.
When the random number generator's output **is** predictable by default:
* The function call on the RNG that returns a random value.
If the factory method or constructor is not already highlighted, it should become
a secondary highlight.