Skip to content

Commit

Permalink
Support removing HHAST async fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Feb 2, 2024
1 parent 5699bc2 commit 36bc99e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/analyzer/function_analysis_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,6 @@ impl FunctionAnalysisData {

for hakana_fixme_or_ignores in &self.hakana_fixme_or_ignores {
for line_issue in hakana_fixme_or_ignores.1 {
if line_issue.0 == IssueKind::NoJoinInAsyncFunction {
continue;
}
if !self
.matched_ignore_positions
.contains(&(line_issue.1 .0, line_issue.1 .1))
Expand Down
5 changes: 3 additions & 2 deletions tests/remove-unused-fixmes/removeHHASTFixme/input.hack
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
function foo(): void {
echo(/* HAKANA_FIXME[NoValue] */ 5);
async function foo(): Awaitable<void> {
/* HHAST_FIXME[NoJoinInAsyncFunction] */
echo(5);
}
2 changes: 1 addition & 1 deletion tests/remove-unused-fixmes/removeHHASTFixme/output.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function foo(): void {
async function foo(): Awaitable<void> {
echo(5);
}
3 changes: 3 additions & 0 deletions tests/remove-unused-fixmes/removeHakanaFixme/input.hack
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function foo(): void {
echo(/* HAKANA_FIXME[NoValue] */ 5);
}
3 changes: 3 additions & 0 deletions tests/remove-unused-fixmes/removeHakanaFixme/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function foo(): void {
echo(5);
}

0 comments on commit 36bc99e

Please sign in to comment.