Skip to content

Add rule to convert math.sqrt() calls into an exponent form - #278

Merged
jeparlefrancais merged 3 commits into
mainfrom
convert-sqrt-call-rule
Jun 23, 2025
Merged

jeparlefrancais merged 3 commits into
mainfrom
convert-sqrt-call-rule

Conversation

@jeparlefrancais

@jeparlefrancais jeparlefrancais commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

Closes #223

Add a new rule (convert_square_root_call) to convert math.sqrt() calls into an exponent form

  • add entry to the changelog

@github-actions

Copy link
Copy Markdown

Coverage after merging convert-sqrt-call-rule into main will be

87.01%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/nodes
   arguments.rs93.94%100%97.73%93.28%128–129, 177–178, 196–198, 201, 261–264, 266, 310–312, 318
src/rules
   convert_square_root_call.rs93%100%92.31%93.10%30, 50–51, 60–62
   mod.rs90.32%100%83.78%91.12%138–140, 159–161, 176, 197–199, 201, 247–249, 362, 402–404, 431, 438–441, 455
   remove_call_match.rs80.53%100%76.92%81%152–156, 158, 16–22, 24–26, 53–55
src/utils
   mod.rs96.55%100%96%96.67%56–57, 64
   preserve_arguments_side_effects.rs35.90%100%100%32.43%16–17, 19–25, 27–36, 38–41, 46, 48

@jeparlefrancais
jeparlefrancais merged commit ef33c64 into main Jun 23, 2025
@jeparlefrancais
jeparlefrancais deleted the convert-sqrt-call-rule branch June 23, 2025 19:47
@jeparlefrancais jeparlefrancais mentioned this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A rule for converting math.sqrt(x)

1 participant