Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT]Make template name format consistent with function name format #2255

Merged
merged 3 commits into from
May 20, 2020

Conversation

Danieladu
Copy link
Contributor

@Danieladu Danieladu commented May 20, 2020

Original issue: microsoft/botbuilder-dotnet#3942
close: #2258
The function name's format cannot cover all template name's formats.

The valid format of template name is

start with letter/number/_ and can only contains letter/number/./_

And the valid format of function name should meet

foreach(var part in expression.split('.')) 
{
    // part should start with letter/_ and can only contains letter/number/_
}

So, in some cases, user use template evaluation in expression with the "gap" format would throw exception.

Here is the remedy that disables the name that begins with number in each part of the split result from dot(.).

Now, the valid format of template name should be :

foreach(var part in expression.split('.')) 
{
    // part should start with letter/_ and can only contains letter/number/_
}

Same with the expression function name.

@Danieladu Danieladu added the R10 Release 10 - August 17th, 2020 label May 20, 2020
@coveralls
Copy link

coveralls commented May 20, 2020

Pull Request Test Coverage Report for Build 132619

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.07%) to 80.286%

Files with Coverage Reduction New Missed Lines %
libraries/botframework-streaming/src/webSocket/webSocketTransport.ts 2 80.65%
libraries/botframework-streaming/src/webSocket/webSocketServer.ts 7 66.67%
Totals Coverage Status
Change from base Build 132473: -0.07%
Covered Lines: 12691
Relevant Lines: 15092

💛 - Coveralls

@Danieladu Danieladu requested a review from cosmicshuai May 20, 2020 09:25
@Danieladu Danieladu merged commit f93eca6 into master May 20, 2020
@Danieladu Danieladu deleted the hond/valid-templatename branch May 20, 2020 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R10 Release 10 - August 17th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PORT] [LG] Make template name format consistent with function name format
3 participants