Skip to content
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

user msgs verified for 2014 & 2015 #1965

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Sarif.Multitool/Rules/RuleResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/Sarif.Multitool/Rules/RuleResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,17 @@ When a result's 'message' object uses the 'id' and 'arguments' properties (which
<value>Placeholder_SARIF2013_ProvideEmbeddedFileContent_Note_Default_Text</value>
</data>
<data name="SARIF2014_ProvideDynamicMessageContent_FullDescription_Text" xml:space="preserve">
<value>Including "dynamic content" (information that varies among results from the same rule) makes your messages more specific. It avoids the "wall of bugs" phenomenon, where hundreds of occurrences of the same message appear unapproachable.</value>
<value>Include "dynamic content" (information that varies among results from the same rule) to makes your messages more specific, and to avoid the "wall of bugs" phenomenon, where hundreds of occurrences of the same message appear unapproachable.

This is part of a set of authoring practices that make your rule messages more readable, understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and 'SARIF2015.EnquoteDynamicMessageContent'.</value>
</data>
<data name="SARIF2014_ProvideDynamicMessageContent_Note_Default_Text" xml:space="preserve">
<value>{0}: In rule '{1}', the '{2}' property of the message with id '{3}' does not include any dynamic content. Dynamic content makes your messages more specific and avoids the "wall of bugs" phenomenon.</value>
<value>{0}: In rule '{1}', the message with id '{2}' does not include any dynamic content. Dynamic content makes your messages more specific and avoids the "wall of bugs" phenomenon, where hundreds of occurrences of the same message appear unapproachable.</value>
</data>
<data name="SARIF2015_EnquoteDynamicMessageContent_FullDescription_Text" xml:space="preserve">
<value>Placing dynamic content in quotes sets it off from the static text, making it easier to spot. It's especially helpful when the dynamic content is a string that might contain spaces, and most especially when the string might be empty (and so would be invisible if it weren't for the quotes). We recommend single quotes for a less cluttered appearance, even though English usage would require double quotes.</value>
<value>Place dynamic content in single quotes to set it off from the static text and to make it easier to spot. It's especially helpful when the dynamic content is a string that might contain spaces, and most especially when the string might be empty (and so would be invisible if it weren't for the quotes). We recommend single quotes for a less cluttered appearance, even though US English usage would require double quotes.

This is part of a set of authoring practices that make your rule messages more readable, understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and 'SARIF2014.ProvideDynamicMessageContent'.</value>
</data>
<data name="SARIF2015_EnquoteDynamicMessageContent_Note_Default_Text" xml:space="preserve">
<value>{0}: In rule '{1}', the message with id '{2}' includes dynamic content that is not enclosed in single quotes. Enquoting dynamic content makes it easier to spot, and single quotes give a less cluttered appearance.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ public class ProvideDynamicMessageContent : SarifValidationSkimmerBase
public override string Id => RuleId.ProvideDynamicMessageContent;

/// <summary>
/// Including "dynamic content" (information that varies among results from the same rule)
/// makes your messages more specific.It avoids the "wall of bugs" phenomenon, where hundreds
/// of occurrences of the same message appear unapproachable.
/// Include "dynamic content" (information that varies among results from the same rule) to
/// makes your messages more specific, and to avoid the "wall of bugs" phenomenon, where
/// hundreds of occurrences of the same message appear unapproachable.
///
/// This is part of a set of authoring practices that make your rule messages more readable,
/// understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and
/// 'SARIF2015.EnquoteDynamicMessageContent'.
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.SARIF2014_ProvideDynamicMessageContent_FullDescription_Text };

Expand Down Expand Up @@ -75,9 +79,9 @@ private void AnalyzeMessageString(string ruleId, string messageString, string me

if (!s_dynamicContentRegex.IsMatch(messageString))
{
// {0}: In rule '{1}', the '{2}' property of the message with id '{3}' does not include
// any dynamic content. Dynamic content makes your messages more specific and avoids the
// "wall of bugs" phenomenon.
// {0}: In rule '{1}', the message with id '{2}' does not include any dynamic content.
// Dynamic content makes your messages more specific and avoids the "wall of bugs"
// phenomenon, where hundreds of occurrences of the same message appear unapproachable.
LogResult(
pointer,
nameof(RuleResources.SARIF2014_ProvideDynamicMessageContent_Note_Default_Text),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ public class EnquoteDynamicMessageContent : SarifValidationSkimmerBase
public override string Id => RuleId.EnquoteDynamicMessageContent;

/// <summary>
/// Placing dynamic content in quotes sets it off from the static text, making it easier
/// to spot. It's especially helpful when the dynamic content is a string that might contain
/// spaces, and most especially when the string might be empty (and so would be invisible
/// if it weren't for the quotes). We recommend single quotes for a less cluttered appearance,
/// even though English usage would require double quotes.
/// Place dynamic content in single quotes to set it off from the static text and to make it easier
/// to spot. It's especially helpful when the dynamic content is a string that might contain spaces,
/// and most especially when the string might be empty (and so would be invisible if it weren't for
/// the quotes). We recommend single quotes for a less cluttered appearance, even though US English
/// usage would require double quotes.
///
/// This is part of a set of authoring practices that make your rule messages more readable,
/// understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and
/// 'SARIF2014.ProvideDynamicMessageContent'.
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.SARIF2015_EnquoteDynamicMessageContent_FullDescription_Text };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"id": "SARIF2014",
"name": "ProvideDynamicMessageContent",
"shortDescription": {
"text": "Including \"dynamic content\" (information that varies among results from the same rule) makes your messages more specific."
"text": "Include \"dynamic content\" (information that varies among results from the same rule) to makes your messages more specific, and to avoid the \"wall of bugs\" phenomenon, where hundreds of occurrences of the same message appear unapproachable."
},
"fullDescription": {
"text": "Including \"dynamic content\" (information that varies among results from the same rule) makes your messages more specific. It avoids the \"wall of bugs\" phenomenon, where hundreds of occurrences of the same message appear unapproachable."
"text": "Include \"dynamic content\" (information that varies among results from the same rule) to makes your messages more specific, and to avoid the \"wall of bugs\" phenomenon, where hundreds of occurrences of the same message appear unapproachable.\r\n\r\nThis is part of a set of authoring practices that make your rule messages more readable, understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and 'SARIF2015.EnquoteDynamicMessageContent'."
},
"messageStrings": {
"Note_Default": {
"text": "{0}: In rule '{1}', the '{2}' property of the message with id '{3}' does not include any dynamic content. Dynamic content makes your messages more specific and avoids the \"wall of bugs\" phenomenon."
"text": "{0}: In rule '{1}', the message with id '{2}' does not include any dynamic content. Dynamic content makes your messages more specific and avoids the \"wall of bugs\" phenomenon, where hundreds of occurrences of the same message appear unapproachable."
}
},
"helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"id": "SARIF2015",
"name": "EnquoteDynamicMessageContent",
"shortDescription": {
"text": "Placing dynamic content in quotes sets it off from the static text, making it easier to spot."
"text": "Place dynamic content in single quotes to set it off from the static text and to make it easier to spot."
},
"fullDescription": {
"text": "Placing dynamic content in quotes sets it off from the static text, making it easier to spot. It's especially helpful when the dynamic content is a string that might contain spaces, and most especially when the string might be empty (and so would be invisible if it weren't for the quotes). We recommend single quotes for a less cluttered appearance, even though English usage would require double quotes."
"text": "Place dynamic content in single quotes to set it off from the static text and to make it easier to spot. It's especially helpful when the dynamic content is a string that might contain spaces, and most especially when the string might be empty (and so would be invisible if it weren't for the quotes). We recommend single quotes for a less cluttered appearance, even though US English usage would require double quotes.\r\n\r\nThis is part of a set of authoring practices that make your rule messages more readable, understandable, and actionable. See also 'SARIF2001.TerminateMessagesWithPeriod' and 'SARIF2014.ProvideDynamicMessageContent'."
},
"messageStrings": {
"Note_Default": {
Expand Down