Skip to content

Fix parsing of some parameter formats in argscheck.checkArgs#200

Merged
raphinesse merged 1 commit intoapache:masterfrom
raphinesse:fix-argscheck
May 2, 2019
Merged

Fix parsing of some parameter formats in argscheck.checkArgs#200
raphinesse merged 1 commit intoapache:masterfrom
raphinesse:fix-argscheck

Conversation

@raphinesse
Copy link
Contributor

@raphinesse raphinesse commented May 2, 2019

Motivation and Context

Some parameter formats were not parsed correctly in argscheck.checkArgs. This would lead to faulty error messages.

Description

Tweaked the RegExes in extractParamName to consume all white space around the tokens of interest.

The recognition is still not perfect (e.g. parameters with defaults). For that, one would have to employ an actual parser. But that's a bit over the top here.

Testing

Added regression test

@raphinesse raphinesse added the bug label May 2, 2019
@raphinesse raphinesse requested review from dpogue and erisu May 2, 2019 22:07
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@raphinesse raphinesse merged commit f0dfd36 into apache:master May 2, 2019
@raphinesse raphinesse deleted the fix-argscheck branch May 2, 2019 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants