Skip to content

Commit

Permalink
Prefactor lint for upcoming fmt changes (#16964)
Browse files Browse the repository at this point in the history
Prefactoring `lint.py` in a few ways:
- Moving the bulk of the logic into a `rule_helper` which will comprise of most of `lint` and `fmt`
- Removing the ambiguity check. This won't hold ground in the "generic implementation" as we already have one ambiguity (`black` for files and targets).
- A few other nits and tweaks

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
thejcannon authored Sep 23, 2022
1 parent f5de7c4 commit 72e73a3
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 191 deletions.
3 changes: 1 addition & 2 deletions src/python/pants/core/goals/fmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ def _get_request_types(
formatters_to_run = determine_specified_tool_names(
"fmt",
fmt_subsystem.only,
fmt_target_request_types,
extra_valid_names=(fbfrt.name for fbfrt in fmt_build_files_request_types),
[*fmt_target_request_types, *fmt_build_files_request_types],
)

filtered_fmt_target_request_types = tuple(
Expand Down
Loading

0 comments on commit 72e73a3

Please sign in to comment.