<commit_before>﻿<?xml version="1.0" encoding="utf-8"?>
<Errors language="C#" configurableSeverityImplementationLanguage="CSHARP"
        baseClass="CSharpUnityHighlightingBase">
  
  <Usings>
    JetBrains.ReSharper.Psi.CSharp;
    JetBrains.ReSharper.Psi.CSharp.Tree;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Errors;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Stages.Highlightings;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Psi.Resolve;
  </Usings>
  
  <!-- Register the static severity groups. This is mostly used in grouping items in SWEA results.
       The groups should be different to any configurable severity groups -->
  <StaticSeverityGroups>
    <Group name="Unity Errors" key="UnityErrors" />
    <Group name="Unity Warnings" key="UnityWarnings" />
    <Group name="Unity Gutter Marks" key="UnityGutterMarks" />
  </StaticSeverityGroups>
  
  <!-- Register the configurable severities
       Can take a child Tag or Group element
       * Tag is configurable severity without a group
       * Group[@name] specifies the name of the group, expects child Tag elements.
         Note that the group name/title should be registered with 
         [assembly: RegisterConfigurableHighlightingsGroup(name, "Title")]
       * Tag[@name] is the HIGHLIGHTING_ID of a warning/error. It is treated as a string
         literal and quoted. It is referenced in Warning[@configurableSeverity]
       * Tag[@default] is the default severity. Just the enum value, no leading "Severity."
       * Tag[@type] is optional. Default is "simple". Other options include "global",
         "localAndGlobal"
       * Tag[@externalName] is also the HIGHLIGHTING_ID, but is treated verbatim, rather
         than as a string literal. This allows for using the fully qualified name of the
         HIGHLIGHTING_ID
       * Tag[@alternatives] the value of RegisterConfigurableSeverityAttribute.AlternativeIDs
       * Tag/Title is the short title of the severity, usually matching the highlight's MESSAGE
       * Tag/Description is a longer description, shown in the options pages
       * Tag/CompoundItemName only used if Tag[@type] is missing or "simple". Sets the compound
         item name
       -->
  <SeverityConfiguration>
    <Group name="UnityHighlightingGroupIds.Unity">
      <Tag externalName="ParameterNotDerivedFromComponentWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Parameter should be derived from `Component`</Title>
        <Description>Parameter should be derived from `Component`.</Description>
      </Tag>
	  
      <Tag externalName="DuplicateEventFunctionWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Event function with the same name is already declared</Title>
        <Description>Event function with the same name is already declared.</Description>
      </Tag>
      
      <Tag externalName="ExplicitTagStringComparisonWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use 'CompareTag' instead of explicit string comparison</Title>
        <Description>Explicit string comparison with 'GameObject.tag' or 'Component.tag' is inefficient. Use the 'CompareTag' method instead.</Description>
      </Tag>

      <Tag externalName="PreferNonAllocApiWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use 'NonAlloc' api instead of methods which allocate memory</Title>
        <Description>Reusing your buffer instead of new allocation will increase performance.</Description>
      </Tag>
      
      <Tag externalName="PreferGenericMethodOverloadWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use generic method overload instead of a string one</Title>
        <Description>Using the string for the component type variants results in additional overhead that should not be incurred.</Description>
      </Tag>

      <Tag externalName="PreferAddressByIdToGraphicsParamsWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use int overload to access properties instead of string</Title>
        <Description>Using the string to address graphics properties results in additional overhead that should not be incurred.</Description>
      </Tag>
      
      <Tag externalName="AmbiguousTypeInStringLiteralWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Several types with the same name, this can result in unexpected behaviour at runtime</Title>
        <Description>There are no guarantees on the object returned if there are several with the same name.</Description>
      </Tag>

      <Tag externalName="UnknownTypeInStringLiteralWarning.HIGHLIGHTING_ID" 
           default="WARNING">
        <Title>Type with the specified name not found</Title>
        <Description>Type with the specified name not found.</Description>
      </Tag>

      <Tag externalName="TypeWithWrongInheritanceInStringLiteralWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Type with the specified name has wrong inheritance</Title>
        <Description>No type with the specified name and required superclass not found.</Description>
      </Tag>

      <Tag externalName="StringBasedMethodInvocationProblemWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Invocation of this method is not efficient</Title>
        <Description>Invocation for this method results in additional overhead. Prefer use of UnityEvent, C# event, delegates or a direct method call.</Description>
      </Tag>
      
      <Tag externalName="IncorrectMonoBehaviourInstantiationWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>MonoBehaviours must be instantiated with 'GameObject.AddComponent&lt;T&gt;()' instead of 'new'</Title>
        <Description>Instantiating a MonoBehaviour based class with 'new' does not attach it to a GameObject, and Unity will not invoke any event functions. Create a new instance using 'GameObject.AddComponent&lt;T&gt;().</Description>
      </Tag>
      
      <Tag externalName="IncorrectScriptableObjectInstantiationWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>ScriptableObjects must be instantiated with 'ScriptableObject.CreateInstance&lt;T&gt;()' instead of 'new'</Title>
        <Description>Instantiating a ScriptableObject base class with 'new' means that Unity will not call any event functions. Use 'ScriptableObject.CreateInstance&lt;T&gt;()' instead.</Description>
      </Tag>
      
      <Tag externalName="IncorrectSignatureWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Incorrect method signature</Title>
        <Description>Method does not match expected signature.</Description>
      </Tag>

      <Tag externalName="InefficientCameraMainUsageWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Inefficient usage of Camera.main</Title>
        <Description>Camera.main is slow and does not cache its result. Using Camera.main in frequently called methods is very inefficient. Prefer caching the result in Start() or Awake()</Description>
      </Tag>

      <Tag externalName="PossibleMisapplicationOfAttributeToMultipleFieldsWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Possible mis-application of attribute to multiple fields</Title>
        <Description>Applying an attribute to a single declaration containing multiple fields will apply the attribute to each field. The highlighted attribute (e.g. 'FormerlySerializedAs') is intended to be applied only to a single field. Prefer an explicit application to a single field in a single declaration.</Description><commit_msg>Modify severity : Warning --> HINT<commit_after>﻿<?xml version="1.0" encoding="utf-8"?>
<Errors language="C#" configurableSeverityImplementationLanguage="CSHARP"
        baseClass="CSharpUnityHighlightingBase">
  
  <Usings>
    JetBrains.ReSharper.Psi.CSharp;
    JetBrains.ReSharper.Psi.CSharp.Tree;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Errors;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Stages.Highlightings;
    JetBrains.ReSharper.Plugins.Unity.CSharp.Psi.Resolve;
  </Usings>
  
  <!-- Register the static severity groups. This is mostly used in grouping items in SWEA results.
       The groups should be different to any configurable severity groups -->
  <StaticSeverityGroups>
    <Group name="Unity Errors" key="UnityErrors" />
    <Group name="Unity Warnings" key="UnityWarnings" />
    <Group name="Unity Gutter Marks" key="UnityGutterMarks" />
  </StaticSeverityGroups>
  
  <!-- Register the configurable severities
       Can take a child Tag or Group element
       * Tag is configurable severity without a group
       * Group[@name] specifies the name of the group, expects child Tag elements.
         Note that the group name/title should be registered with 
         [assembly: RegisterConfigurableHighlightingsGroup(name, "Title")]
       * Tag[@name] is the HIGHLIGHTING_ID of a warning/error. It is treated as a string
         literal and quoted. It is referenced in Warning[@configurableSeverity]
       * Tag[@default] is the default severity. Just the enum value, no leading "Severity."
       * Tag[@type] is optional. Default is "simple". Other options include "global",
         "localAndGlobal"
       * Tag[@externalName] is also the HIGHLIGHTING_ID, but is treated verbatim, rather
         than as a string literal. This allows for using the fully qualified name of the
         HIGHLIGHTING_ID
       * Tag[@alternatives] the value of RegisterConfigurableSeverityAttribute.AlternativeIDs
       * Tag/Title is the short title of the severity, usually matching the highlight's MESSAGE
       * Tag/Description is a longer description, shown in the options pages
       * Tag/CompoundItemName only used if Tag[@type] is missing or "simple". Sets the compound
         item name
       -->
  <SeverityConfiguration>
    <Group name="UnityHighlightingGroupIds.Unity">
      <Tag externalName="ParameterNotDerivedFromComponentWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Parameter should be derived from `Component`</Title>
        <Description>Parameter should be derived from `Component`.</Description>
      </Tag>
	  
      <Tag externalName="DuplicateEventFunctionWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Event function with the same name is already declared</Title>
        <Description>Event function with the same name is already declared.</Description>
      </Tag>
      
      <Tag externalName="ExplicitTagStringComparisonWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use 'CompareTag' instead of explicit string comparison</Title>
        <Description>Explicit string comparison with 'GameObject.tag' or 'Component.tag' is inefficient. Use the 'CompareTag' method instead.</Description>
      </Tag>

      <Tag externalName="PreferNonAllocApiWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use 'NonAlloc' api instead of methods which allocate memory</Title>
        <Description>Reusing your buffer instead of new allocation will increase performance.</Description>
      </Tag>
      
      <Tag externalName="PreferGenericMethodOverloadWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use generic method overload instead of a string one</Title>
        <Description>Using the string for the component type variants results in additional overhead that should not be incurred.</Description>
      </Tag>

      <Tag externalName="PreferAddressByIdToGraphicsParamsWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Use int overload to access properties instead of string</Title>
        <Description>Using the string to address graphics properties results in additional overhead that should not be incurred.</Description>
      </Tag>
      
      <Tag externalName="AmbiguousTypeInStringLiteralWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Several types with the same name, this can result in unexpected behaviour at runtime</Title>
        <Description>There are no guarantees on the object returned if there are several with the same name.</Description>
      </Tag>

      <Tag externalName="UnknownTypeInStringLiteralWarning.HIGHLIGHTING_ID" 
           default="WARNING">
        <Title>Type with the specified name not found</Title>
        <Description>Type with the specified name not found.</Description>
      </Tag>

      <Tag externalName="TypeWithWrongInheritanceInStringLiteralWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>Type with the specified name has wrong inheritance</Title>
        <Description>No type with the specified name and required superclass not found.</Description>
      </Tag>

      <Tag externalName="StringBasedMethodInvocationProblemWarning.HIGHLIGHTING_ID"
           default="HINT">
        <Title>Invocation of this method is not efficient</Title>
        <Description>Invocation for this method results in additional overhead. Prefer use of UnityEvent, C# event, delegates or a direct method call.</Description>
      </Tag>
      
      <Tag externalName="IncorrectMonoBehaviourInstantiationWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>MonoBehaviours must be instantiated with 'GameObject.AddComponent&lt;T&gt;()' instead of 'new'</Title>
        <Description>Instantiating a MonoBehaviour based class with 'new' does not attach it to a GameObject, and Unity will not invoke any event functions. Create a new instance using 'GameObject.AddComponent&lt;T&gt;().</Description>
      </Tag>
      
      <Tag externalName="IncorrectScriptableObjectInstantiationWarning.HIGHLIGHTING_ID"
           default="WARNING">
        <Title>ScriptableObjects must be instantiated with 'ScriptableObject.CreateInstance&lt;T&gt;()' instead of 'new'</Title>
        <Description>Instantiating a ScriptableObject base class with 'new' means that Unity will not call any event functions. Use 'ScriptableObject.CreateInstance&lt;T&gt;()' instead.</Description>
      </Tag>
      
      <Tag externalName="IncorrectSignatureWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Incorrect method signature</Title>
        <Description>Method does not match expected signature.</Description>
      </Tag>

      <Tag externalName="InefficientCameraMainUsageWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Inefficient usage of Camera.main</Title>
        <Description>Camera.main is slow and does not cache its result. Using Camera.main in frequently called methods is very inefficient. Prefer caching the result in Start() or Awake()</Description>
      </Tag>

      <Tag externalName="PossibleMisapplicationOfAttributeToMultipleFieldsWarning.HIGHLIGHTING_ID" default="WARNING">
        <Title>Possible mis-application of attribute to multiple fields</Title>
        <Description>Applying an attribute to a single declaration containing multiple fields will apply the attribute to each field. The highlighted attribute (e.g. 'FormerlySerializedAs') is intended to be applied only to a single field. Prefer an explicit application to a single field in a single declaration.</Description>
{'fraction_non_alphanumeric': 0.08223510806536637, 'fraction_numerical': 0.00039536109646810753, 'mean_word_length': 3.6871525633106854, 'pattern_counts': {'":': 0, '<': 207, '<?xml version=': 2, '>': 208, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1792972', 'n_tokens_mistral': 3990, 'n_tokens_neox': 3827, 'n_words': 1274}