-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefactor lint for upcoming fmt changes #16964
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
src/python/pants/core/goals/lint.py
Outdated
@@ -637,7 +643,7 @@ def key(fs: FieldSet) -> str: | |||
return Lint(_get_error_code(all_batch_results)) | |||
|
|||
|
|||
@rule(level=LogLevel.DEBUG) | |||
@rule(level=LogLevel.TRACE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary to set? It should default to TRACE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh I misunderstood why we were seeing the message. LintResult
is a EngineAwareReturnType
whose level
is INFO
.
Hmmm....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've undone the change. If we can stomach seeing the annoying message a bit longer, I have a future change I plan on implementing after the fmt
refactor which as I shared with Stu in DM:
My plan to not make LintResult
streaming, and use a another rule (like this one) which converts a LintResult
into a StreamedLintResult
. The difference is right now we force plugin authors to plumb the input snapshot and tool name into LintResult
. New change will have that in StreamedLintResult
, but not LintResult
.
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
I had to move the batching out of the helper. In |
Prefactoring
lint.py
in a few ways:rule_helper
which will comprise of most oflint
andfmt
black
for files and targets).[ci skip-rust]
[ci skip-build-wheels]