Skip to content

Conversation

ricekot
Copy link
Member

@ricekot ricekot commented Apr 9, 2024

Format all JS scripts with Prettier via the Spotless Gradle plugin.

The dependency on npm to run prettier is fulfilled via the gradle-node-plugin.

Part of #170.

text = text.replace("\n", "\\n");
return text
function prepareDiffText(text) {
text = text.replace("\r", "\\r");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding

This replaces only the first occurrence of "\r".
return text
function prepareDiffText(text) {
text = text.replace("\r", "\\r");
text = text.replace("\n", "\\n");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding

This replaces only the first occurrence of "\n".

Verified

This commit was signed with the committer’s verified signature.
ricekot Akshath Kothari
Signed-off-by: ricekot <[email protected]>
@ricekot ricekot force-pushed the spotless-js-scripts branch from e3175f3 to 9fa4064 Compare April 12, 2024 04:16
@thc202
Copy link
Member

thc202 commented Apr 12, 2024

Thank you!

Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

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

Cool

@kingthorin kingthorin merged commit a941beb into zaproxy:main Apr 12, 2024
@ricekot ricekot deleted the spotless-js-scripts branch April 12, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants