else lint error on condition-begin-end
See original GitHub issueThe test suite is passing, but there is one case that isn’t included, and it fails on that case.
replace the file source/TSQLLint.Tests/UnitTests/LintingRules/conditional-begin-end/test-files/conditional-begin-end-no-error.sql
with this content (I added the else case):
IF(1 = 1)
BEGIN;
SELECT 1
END;
ELSE
BEGIN;
SELECT 2
END;
If u run the tests, it fails.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
typescript - tslint misplaced 'else' (one-line)
You have a tslint rule enabled called one-line with a token specified called check-else . This tells tslint to warn for every else...
Read more >JavaScript static code analysis: "if ... else ...
This rule applies whenever an if statement is followed by one or more else if statements; the final else if should be followed...
Read more >When Should I Use One Liner if...else Statements in Go?
According to Effective Go… In the Go libraries, you'll find that when an if statement doesn't flow into the next statement — that...
Read more >Developer insists if statements shouldn't have negated ...
Explicit else block. The first rule just pollutes the code and makes it neither more readable, nor less error-prone.
Read more >Rules Reference - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nathan-boyd I don’t see this as an issue anymore. I think it can be closed out by @stephenweaver 's PR https://github.com/tsqllint/tsqllint/pull/291
Working properly now for me, thanks