-
Notifications
You must be signed in to change notification settings - Fork 29
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
Create rule S6451: Do not escape quotes in code snippet’s attributes values #1242
base: master
Are you sure you want to change the base?
Conversation
d83e7b3
to
c32f0b3
Compare
SonarQube Quality Gate for 'rspec-tools' |
SonarQube Quality Gate for 'rspec-frontend' |
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.
Looks nice, just a few comments.
@@ -0,0 +1,77 @@ | |||
In Javadoc code snippets introduced with Java 18, attributes' values can be quoted with single-quote (') characters or double-quote (") characters. Simple values, such as identifiers or numbers need not be quoted. According to Javadoc's specification, escape sequences are not supported in attribute value. Using them will therefore lead to unpredictable behaviors when parsing the snippet, at best, and "spurious markup" warnings being reported. |
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.
How about
In Javadoc code snippets introduced with Java 18, attributes' values can be quoted with single-quote (') characters or double-quote (") characters. Simple values, such as identifiers or numbers need not be quoted. According to Javadoc's specification, escape sequences are not supported in attribute value. Using them will therefore lead to unpredictable behaviors when parsing the snippet, at best, and "spurious markup" warnings being reported. | |
In Javadoc code snippets introduced with Java 18, attributes' values can be quoted with single-quote (') characters or double-quote (") characters. Simple values, such as identifiers or numbers don't need to be quoted. According to Javadoc's specification, escape sequences are not supported in the attribute values. Using them will therefore lead to unpredictable behaviors when parsing the snippet, at best, and "spurious markup" warnings being reported. |
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.
And I think it will be nice to use hyperlink when mentioning Javadoc specification
@@ -0,0 +1,18 @@ | |||
{ | |||
"title": "Do not escape quotes in code snippet attributes values", |
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.
According to this guideline rule titles should be "X should (not) Y"
How about "Quotes should not be escaped in the code snippet attributes values"?
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"javadoc" |
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.
"javadoc" | |
"javadoc", | |
"java18" |
c32f0b3
to
cd4bced
Compare
SonarQube Quality Gate for 'rspec-tools' |
SonarQube Quality Gate for 'rspec-frontend' |
You can preview this rule here (updated a few minutes after each push).