KEMBAR78
Support file specific linter config by Atry · Pull Request #414 · hhvm/hhast · GitHub
Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Nov 26, 2021

The file specific linter config is used in #417

@Atry Atry force-pushed the overrides-linterConfigs branch from 8839e01 to 805f0e3 Compare November 27, 2021 00:11
@Atry Atry marked this pull request as ready for review November 27, 2021 00:47
@Atry Atry force-pushed the overrides-linterConfigs branch from 6bbc973 to da5fa36 Compare November 27, 2021 00:49
@fredemmott
Copy link
Contributor

This is probably a worthwhile change on itself, but I don't think it should be needed here: does /*HHAST_IGNORE_ALL[1234]*/ not work for these? If not, that should be fixed:

  • for consistency
  • per-file suppressions via config is not scalable, especially as json's lack of support for trailing commas increases the risk of merge conflicts

@lexidor
Copy link
Contributor

lexidor commented Nov 30, 2021

This is probably a worthwhile change on itself, but I don't think it should be needed here: does /*HHAST_IGNORE_ALL[1234]*/ not work for these? If not, that should be fixed:

I believe this PR intends to address my comment on #409

This might also be a nice alternative to .LICENSE_HEADER.hh.txt. The LicenseHeaderLinter predates linter configuration and uses a well-known naming convention for setting per directory license headers instead. Once configuration is able to be declared in a override, this system can be supplemented using a configuration.

@Atry
Copy link
Contributor Author

Atry commented Nov 30, 2021

This is probably a worthwhile change on itself, but I don't think it should be needed here: does /*HHAST_IGNORE_ALL[1234]*/ not work for these? If not, that should be fixed:

  • for consistency
  • per-file suppressions via config is not scalable, especially as json's lack of support for trailing commas increases the risk of merge conflicts

I suppose people could use this PR to suppress linter errors in dependencies, where you cannot easily add HHAST_IGNORE_ALL comments.

@fredemmott
Copy link
Contributor

I suppose people could use this PR to suppress linter errors in dependencies, where you cannot easily add HHAST_IGNORE_ALL comments.

People should not be linting their dependencies; lint-cleanness should be considered an implementation detail

@Atry Atry marked this pull request as draft November 30, 2021 20:05
@fredemmott
Copy link
Contributor

This is probably a worthwhile change on itself,

Just to clarify what I meant here:

I think this PR is good, and should probably be merged

I don't think the rest of the stack should depend on it :)

@Atry Atry force-pushed the overrides-linterConfigs branch from da5fa36 to 2960730 Compare November 30, 2021 21:13
@Atry Atry marked this pull request as ready for review November 30, 2021 21:36
@Atry Atry requested a review from fredemmott November 30, 2021 21:41
@Atry
Copy link
Contributor Author

Atry commented Nov 30, 2021

Rebased this PR to avoid dependencies between other PRs

Copy link
Contributor

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use dynamic instead of shape and remove XHP changes before merging

@fredemmott
Copy link
Contributor

XHP change seems needed because of this, but should be a separate PR (and separate commit in the main branch) as it's independent and should be reviewed (and potentially bisected or reverted) separately

@Atry Atry force-pushed the overrides-linterConfigs branch from 2960730 to 0db279d Compare November 30, 2021 22:13
@Atry Atry merged commit 7c22f88 into hhvm:main Nov 30, 2021
@Atry Atry deleted the overrides-linterConfigs branch November 30, 2021 22:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants