Skip to content

Add rule for warning about backticks that look like line-continuations but are not #425

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

Merged
merged 2 commits into from
Jan 12, 2016

Conversation

AndrewGaspar
Copy link
Contributor

This is in response to #423.

Let me know if there are any anti-patterns here. Examining the text directly feels a little weird here, but I believe that escaped whitespace isn't reflected in any way in the AST, so I need to look at the text directly.

@msftclas
Copy link

msftclas commented Jan 8, 2016

Hi @AndrewGaspar, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@raghushantha
Copy link
Member

Hi Andrew. Thank you for the new rule and the test cases. Changes look good.

Please fix this failing test before we can merge the PR:
Describing Test Name parameters
Context When used correctly
[+] works with 1 name 275ms
[+] works for DSC Rule 17ms
[+] works with 3 names 21ms
[-] Get Rules with no parameters supplied 181ms
Expected: {38}
But was: {39}
59: $defaultRules.Count | Should be 38
at , C:\projects\psscriptanalyzer\Tests\Engine\GetScriptAnalyzerRule.tests.ps1: line 59

@AndrewGaspar
Copy link
Contributor Author

Oh yeah, sorry about that. I'll fix that tonight. Does that count just need to stay in sync with the number of rules in ScriptAnalyzer?

@raghushantha
Copy link
Member

Yes.

@AndrewGaspar
Copy link
Contributor Author

Tests fixed

@raghushantha
Copy link
Member

Great.. Thanks!

raghushantha added a commit that referenced this pull request Jan 12, 2016
Add rule for warning about backticks that look like line-continuations but are not
@raghushantha raghushantha merged commit c07412b into PowerShell:development Jan 12, 2016
@raghushantha
Copy link
Member

Need to update the rule documentation. I will take care of that
https://github.com/PowerShell/PSScriptAnalyzer/tree/development/RuleDocumentation

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.

3 participants