First Pull Request


Add auto-fixing CRLF linter hhvm/hhast

If windows newlines are present, the linter should suggest that they're replaced with unix newlines. There's two ways to do this: - as an AST linter, looking at each node's first token's leadi...

Created - 0 comments - good first issue new linter

Add `->replaceWithCode(EditableNode, string)` or similar hhvm/hhast

It's somewhat more convenient than actually having to construct a replacement AST for simple fixes/migrations. This should use a manually created EditableNode subclass with no children, and user-sp...

Created - 0 comments - core good first issue

Add linters for UNSAFE, UNSAFE_BLOCK, UNSAFE_EXPR and HH_(FIXME|IGNORE_ERROR)[1002] hhvm/hhast

- These should all be separate linters, except for UNSAFE and UNSAFE_BLOCK - UNSAFE_EXPR is better than UNSAFE and UNSAFE_EXPR but not as good as FIXME|IGNORE_ERROR - using HH_IGNORE_ERROR[100...

Created - 0 comments - good first issue new linter

Generalize the `builtinLinters` configuration option to be extensible hhvm/hhast

It would be good for users to opt-in to a full suite of linters from a third-party, rather than having to whitelist every specific linter - for example, if a framework decides to ship linters for i...

Created - 0 comments - core enhancement good first issue

Add ability to pin `hh_parse` to a specific path or binary name`` hhvm/hhast

This would allow updating HHAST independently of HHVM versions

Created - 0 comments - good first issue help wanted

Add linter for double-quoted strings hhvm/hhast

Should not be on by default, but should be on when linters = all Prefer single quoted strings. Exceptions: - if the string contains quotation marks - if the string contains interpolation - ...

Created - 0 comments - good first issue new linter

Add unit test for standard CLI mode hhvm/hhast

Should check: - "No Errors" only appears when there were no errors - having had autofixes doesn't get that - exit code is 0 if there were no errors, or all errors were autofixed - exit code is n...

Created - 0 comments - core good first issue

Allow linters to disable 'yes to all' autofixes hhvm/hhast

Some linters have unsafe autofixes, for example, the 'basic assignment' linter also detects accidental `invariant($foo = $bar, ...)`

Created - 0 comments - core good first issue

Add linter banning newline as the first line of a block hhvm/hhast

e.g. ```Hack function foo() { bar(); ```

Created - 0 comments - good first issue new linter

Extend camelcase/underscore function naming linter to use class name rules for type aliass hhvm/hhast

eg ```Hack type foo_bar = Baz; // ...should be... type FooBar = Baz; ```

Created - 0 comments - good first issue

Add linter for enum member names and constants: all uppercase hhvm/hhast

We have the same coding style rules for enum member names as we do for constants, e.g. ```Hack enum Foo : int { // Desired: BAR = 0; // Undesired: Baz = 0; } ```

Created - 0 comments - good first issue new linter

Add non-autofixing linter for `\HH\Asio\join()` hhvm/hhast

Should: - handle if `join` is pulled in via a `use` statement - recommend refactoring to async functions and using `await` instead

Created - 0 comments - good first issue new linter

Add a better interface (help text) for no-longer-supported migrations hhvm/hhast

I'm occasionally deleting migrations if: - updating them to work with new HHAST is going to be painful - they've already been in several releases - they've been required for several releases of ...

Created - 0 comments - enhancement good first issue

add linter against shadowing local variables in foreach hhvm/hhast

This should be a lint error: ```hack $value = 42; // ... foreach ($arr as $value) { // ... } ``` Same for function arguments: ```hack function foo(int $value) { // ... forea...

Created - 0 comments - good first issue new linter

getBasesResponses should specify 'Content-Type:application/json' in curl options facebook/fbctf

The function getBasesResponses() in /src/models/Level.php should specify that it is expecting to receive json data in the curl options. This gives greater flexibility to the server hosting the bas...

Created - 3 comments - good first issue platform

does not observe `vendor-dir` config in composer.json hhvm/hhast

All the `bin` scripts expect to find `hh_autoload.php` within `vendor` directory: https://github.com/hhvm/hhast/search?q=autoload.php&unscoped_q=hh_autoload.php While `vendor` is the default ven...

Created - 4 comments - enhancement good first issue

CLI: add `--diff` option to `hhast-lint`, like `hackfmt --diff` hhvm/hhast

This should: - take a git or hg diff on STDIN (if you don't use hg, a PR adding just git support is very welcome) - run the linters on every file that the diff touched - not error out if th...

Created - 5 comments - core good first issue

Displaying all 18 issues

License

Language

Labels