Skip to content

Sniff::getTestVersion(): simplify regex logic.#520

Merged
wimg merged 1 commit intomasterfrom
feature/simplify-testversion-code
Nov 2, 2017
Merged

Sniff::getTestVersion(): simplify regex logic.#520
wimg merged 1 commit intomasterfrom
feature/simplify-testversion-code

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Oct 25, 2017

Minor simplification of the code in the getTestVersion() method.

  • Use 2 instead of 4 regexes.
  • Always check if the min and max versions are within bounds.
  • Return early.

Minor simplification of the code in the `getTestVersion()` method.

* Use 2 instead of 4 regexes.
* Always check if the min and max versions are within bounds.
@jrfnl jrfnl requested a review from wimg October 25, 2017 00:52
@wimg wimg merged commit c2da2ac into master Nov 2, 2017
@wimg wimg deleted the feature/simplify-testversion-code branch November 2, 2017 01:13
@jrfnl jrfnl added this to the 8.1.0 milestone Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants