Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Reimplement SingleRuleLinter::isLinterSuppressedForFile with the help…
Browse files Browse the repository at this point in the history
… of File::lintMarkers
  • Loading branch information
Atry authored Nov 9, 2021
1 parent 0d09d00 commit 009b7b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Linters/SingleRuleLinter.hack
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ abstract class SingleRuleLinter implements LintRule, Linter {
* Is this linter error disabled for the entire file?
* Memoized since this should not change per run.
*/
<<__Memoize>>
public function isLinterSuppressedForFile(): bool {
return Str\contains(
$this->getFile()->getContents(),
return C\contains_key(
$this->getFile()->lintMarkers(),
$this->getIgnoreAllMarker(),
);
}
Expand Down

0 comments on commit 009b7b1

Please sign in to comment.