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

Allow use of async return value promise #731

Closed
NilSet opened this issue Sep 12, 2017 · 0 comments · Fixed by #743
Closed

Allow use of async return value promise #731

NilSet opened this issue Sep 12, 2017 · 0 comments · Fixed by #743
Assignees
Labels
type: bug Exceptions and blocking issues during analysis type: false positive Issue is reported when it should NOT be
Milestone

Comments

@NilSet
Copy link
Contributor

NilSet commented Sep 12, 2017

I want to report a bug.

SonarJS version: 3.1.1

Rule key: S3699 aka UseOfEmptyReturnValue

Reproducer

var arrowReturnsPromise = async () => {
   var x = () => {return 1}
};
x = arrowReturnsPromise(); // False-positive

Expected behavior
All async functions return a promise, regardless of if the body has an empty return value, so this rule should allow use of the return value.

@inverno inverno added type: bug Exceptions and blocking issues during analysis type: false positive Issue is reported when it should NOT be rule labels Sep 12, 2017
@inverno inverno added this to the 3.2 milestone Sep 13, 2017
@inverno inverno self-assigned this Sep 13, 2017
@inverno inverno closed this as completed Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Exceptions and blocking issues during analysis type: false positive Issue is reported when it should NOT be
Projects
None yet
2 participants