-
Notifications
You must be signed in to change notification settings - Fork 653
feat(rome_js_analyze): noExtraBooleanCast #2868
feat(rome_js_analyze): noExtraBooleanCast #2868
Conversation
47347ec
to
d416666
Compare
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
pub(crate) NoExtraBooleanCast = "noExtraBooleanCast" | ||
} | ||
|
||
/// Check if this node is in the position of `test` slot of parent syntax node. |
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.
Could you please review this comment? What's test
? The reason I am asking to change it is because if a new developer reads this documentation, they won't understand what's test
because it's really specific to the implementation of the function. It's better to give an overview of what the function does, not technical details.
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.
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 think JsWhileStatement::test
would be quite clear.
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.
It's not about the name of the node, it's about the whole comment. When I read it without checking the code of function, I don't understand what it means.
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
!bench_analyzer |
Analyzer Benchmark Results
|
@IWANABETHATGUY are there any progress on this PR? Do you need any help? |
Nope, I will address issues this week. |
!bench_analyzer |
Analyzer Benchmark Results
|
I think there should be a more performant way to implement this, let me try. |
crates/rome_js_analyze/src/analyzers/js/no_extra_boolean_cast.rs
Outdated
Show resolved
Hide resolved
3928494
to
00abf6b
Compare
/// !!x; | ||
/// ``` | ||
pub(crate) NoExtraBooleanCast { | ||
version: "0.8.0", |
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.
This should be 0.9.0
now. Once updated, we can merge it
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.
Done
00abf6b
to
d6cc2b9
Compare
Summary
Test Plan