question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

else lint error on condition-begin-end

See original GitHub issue

The 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ltylendacommented, Nov 15, 2022

@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

1reaction
lowlydbacommented, Apr 18, 2022

Working properly now for me, thanks

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found