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

Fix spelling error in rtm.5 schema #2426

Merged
merged 1 commit into from
Jan 27, 2022
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
4 changes: 2 additions & 2 deletions docs/ValidationRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ GitHub Advanced Security code scanning will reject a SARIF file that expresses r

### Description

The two identity-related properties of a SARIF rule must be consistent. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifer that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If both 'name' and 'id' are opaque identifiers, omit the 'name' property. If both 'name' and 'id' are human-readable identifiers, then consider assigning an opaque identifier to each rule, but in the meantime, omit the 'name' property.
The two identity-related properties of a SARIF rule must be consistent. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifier that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If both 'name' and 'id' are opaque identifiers, omit the 'name' property. If both 'name' and 'id' are human-readable identifiers, then consider assigning an opaque identifier to each rule, but in the meantime, omit the 'name' property.

### Messages

#### `Default`: Warning

{0}: The rule '{1}' has a 'name' property that is identical to its 'id' property. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifer that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If they are identical, the tool must omit the 'name' property.
{0}: The rule '{1}' has a 'name' property that is identical to its 'id' property. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifier that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If they are identical, the tool must omit the 'name' property.

---

Expand Down
6 changes: 3 additions & 3 deletions src/Sarif.Multitool.Library/Rules/RuleResources.Designer.cs

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

4 changes: 2 additions & 2 deletions src/Sarif.Multitool.Library/Rules/RuleResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="SARIF1001_RuleIdentifiersMustBeValid_Warning_Default_Text" xml:space="preserve">
<value>{0}: The rule '{1}' has a 'name' property that is identical to its 'id' property. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifer that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If they are identical, the tool must omit the 'name' property.</value>
<value>{0}: The rule '{1}' has a 'name' property that is identical to its 'id' property. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifier that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If they are identical, the tool must omit the 'name' property.</value>
</data>
<data name="SARIF1001_RuleIdentifiersMustBeValid_FullDescription_Text" xml:space="preserve">
<value>The two identity-related properties of a SARIF rule must be consistent. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifer that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If both 'name' and 'id' are opaque identifiers, omit the 'name' property. If both 'name' and 'id' are human-readable identifiers, then consider assigning an opaque identifier to each rule, but in the meantime, omit the 'name' property.</value>
<value>The two identity-related properties of a SARIF rule must be consistent. The required 'id' property must be a "stable, opaque identifier" (the SARIF specification ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839)) explains the reasons for this). The optional 'name' property ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843)) is an identifier that is understandable to an end user. Therefore if both 'id' and 'name' are present, they must be different. If both 'name' and 'id' are opaque identifiers, omit the 'name' property. If both 'name' and 'id' are human-readable identifiers, then consider assigning an opaque identifier to each rule, but in the meantime, omit the 'name' property.</value>
</data>
<data name="SARIF1002_UrisMustBeValid_Error_UrisMustConformToRfc3986_Text" xml:space="preserve">
<value>{0}: The string '{1}' is not a valid URI reference. URIs must conform to [RFC 3986](https://tools.ietf.org/html/rfc3986).</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class RuleIdentifiersMustBeValid : SarifValidationSkimmerBase
/// ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839))
/// explains the reasons for this). The optional 'name' property
/// ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843))
/// is an identifer that is understandable to an end user. Therefore if both 'id' and 'name'
/// is an identifier that is understandable to an end user. Therefore if both 'id' and 'name'
/// are present, they must be different. If both 'name' and 'id' are opaque identifiers,
/// omit the 'name' property. If both 'name' and 'id' are human-readable identifiers, then
/// consider assigning an opaque identifier to each rule, but in the meantime, omit the 'name'
Expand All @@ -42,7 +42,7 @@ protected override void Analyze(ReportingDescriptor reportingDescriptor, string
// ([3.49.3](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317839))
// explains the reasons for this). The optional 'name' property
// ([3.49.7](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317843))
// is an identifer that is understandable to an end user. Therefore if both 'id' and
// is an identifier that is understandable to an end user. Therefore if both 'id' and
// 'name' are present, they must be different. If they are identical, the tool must
// omit the 'name' property.
LogResult(
Expand Down
4 changes: 2 additions & 2 deletions src/Sarif/Autogenerated/ExternalProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ public virtual SarifNodeKind SarifNodeKind
public virtual SarifVersion Version { get; set; }

/// <summary>
/// A stable, unique identifer for this external properties object, in the form of a GUID.
/// A stable, unique identifier for this external properties object, in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public virtual string Guid { get; set; }

/// <summary>
/// A stable, unique identifer for the run associated with this external properties object, in the form of a GUID.
/// A stable, unique identifier for the run associated with this external properties object, in the form of a GUID.
/// </summary>
[DataMember(Name = "runGuid", IsRequired = false, EmitDefaultValue = false)]
public virtual string RunGuid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/ExternalPropertyFileReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public virtual SarifNodeKind SarifNodeKind
public virtual ArtifactLocation Location { get; set; }

/// <summary>
/// A stable, unique identifer for the external property file in the form of a GUID.
/// A stable, unique identifier for the external property file in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/ReportingDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public SarifNodeKind SarifNodeKind
public virtual IList<string> DeprecatedIds { get; set; }

/// <summary>
/// A unique identifer for the reporting descriptor in the form of a GUID.
/// A unique identifier for the reporting descriptor in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false, Order = 9)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public FailureLevel Level
public IList<Location> Locations { get; set; }

/// <summary>
/// A stable, unique identifer for the result in the form of a GUID.
/// A stable, unique identifier for the result in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/RunAutomationDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public virtual SarifNodeKind SarifNodeKind
public virtual string Id { get; set; }

/// <summary>
/// A stable, unique identifer for this object's containing run object in the form of a GUID.
/// A stable, unique identifier for this object's containing run object in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/Suppression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public virtual SarifNodeKind SarifNodeKind
}

/// <summary>
/// A stable, unique identifer for the suprression in the form of a GUID.
/// A stable, unique identifier for the suprression in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/Autogenerated/ToolComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public virtual SarifNodeKind SarifNodeKind
}

/// <summary>
/// A unique identifer for the tool component in the form of a GUID.
/// A unique identifier for the tool component in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/NotYetAutoGenerated/ReportingDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public SarifNodeKind SarifNodeKind
public virtual IList<string> DeprecatedIds { get; set; }

/// <summary>
/// A unique identifer for the reporting descriptor in the form of a GUID.
/// A unique identifier for the reporting descriptor in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false, Order = 9)]
public virtual string Guid { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif/NotYetAutoGenerated/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public FailureLevel Level
public IList<Location> Locations { get; set; }

/// <summary>
/// A stable, unique identifer for the result in the form of a GUID.
/// A stable, unique identifier for the result in the form of a GUID.
/// </summary>
[DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)]
public string Guid { get; set; }
Expand Down
16 changes: 8 additions & 8 deletions src/Sarif/Schemata/sarif-2.1.0-rtm.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,13 @@
},

"guid": {
"description": "A stable, unique identifer for this external properties object, in the form of a GUID.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

identifer

is it right to make changes to a schema that is already published? not sure how the flow works.

i saw that is only english word changes, but not sure if that is correct or not

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Somehow rtm.5 was published without this misspelling. We decided to think of this as a change to bring the published and checked-in schemas into sync, and would therefore not create a new version.

"description": "A stable, unique identifier for this external properties object, in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},

"runGuid": {
"description": "A stable, unique identifer for the run associated with this external properties object, in the form of a GUID.",
"description": "A stable, unique identifier for the run associated with this external properties object, in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -778,7 +778,7 @@
},

"guid": {
"description": "A stable, unique identifer for the external property file in the form of a GUID.",
"description": "A stable, unique identifier for the external property file in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -1825,7 +1825,7 @@
},

"guid": {
"description": "A unique identifer for the reporting descriptor in the form of a GUID.",
"description": "A unique identifier for the reporting descriptor in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -2079,7 +2079,7 @@
},

"guid": {
"description": "A stable, unique identifer for the result in the form of a GUID.",
"description": "A stable, unique identifier for the result in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -2590,7 +2590,7 @@
},

"guid": {
"description": "A stable, unique identifer for this object's containing run object in the form of a GUID.",
"description": "A stable, unique identifier for this object's containing run object in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -2702,7 +2702,7 @@
"properties": {

"guid": {
"description": "A stable, unique identifer for the suprression in the form of a GUID.",
"description": "A stable, unique identifier for the suprression in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down Expand Up @@ -2932,7 +2932,7 @@
"properties": {

"guid": {
"description": "A unique identifer for the tool component in the form of a GUID.",
"description": "A unique identifier for the tool component in the form of a GUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
Expand Down
Loading