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

Support multiple forms of inline suppression #308

Open
fredemmott opened this issue Jul 15, 2020 · 0 comments
Open

Support multiple forms of inline suppression #308

fredemmott opened this issue Jul 15, 2020 · 0 comments

Comments

@fredemmott
Copy link
Contributor

HHAST_FIXME and HHAST_IGNORE_ERROR were originally intended to mirror HH_FIXME vs HH_IGNORE_ERROR

  • HH_IGNORE_ERROR has been removed
  • the 'error' part makes some people feel more uncomfortable suppressing linters than they should; linters should generally be taken as 'this is fishy', not a hard error. There are valid reasons to e.g. await in a loop, and suppressing the linter is better/clearer than refactoring to avoid triggering it

Linters can provide their own override, but that replaces the default set.

I suggest:

  1. changing this to a keyset<string> so that specific linters can add a supported suppression
  2. adding a few more defaults:
  • HHAST_IGNORE[Classname]: still consistent, but briefer, and doesn't have the negative connotations of FIXME or ERROR
  • @lint-ignore ClassName: consistent with some other frameworks, and still a low chance of collision - and it doesn't matter if there is a collision
  1. (optional) allow projects to configure their own additional suppression comments for each linter
  • for example, could support @lint-ignore FacebookInternalLinterName in the HSL
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant