Skip to content

Commit

Permalink
Remove metadata based file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-carter-at-sf committed Dec 18, 2024
1 parent 44dfc10 commit 246441e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<!-- TODO: NEED TO ADD IN externalInfoUrl ONCE WE HAVE A PERMANENT LOCATION FOR THE DOC PAGE -->
<description>Detects use of Api.Session_ID or GETSESSIONID() to retrieve a session ID.</description>
<priority>2</priority>
<!-- TODO: (NEED TO FINISHING GETTING LIST OF FILE EXTENSIONS FOR THIS RULE) This rule is associated with file extensions: ??, .object, .tab, .xml -->
<properties>
<property name="xpath">
<value><![CDATA[
Expand All @@ -35,7 +34,6 @@ contains(upper-case(@Text),"GETSESSIONID")
<!-- TODO: NEED TO ADD IN externalInfoUrl ONCE WE HAVE A PERMANENT LOCATION FOR THE DOC PAGE -->
<description>Detects use of API versions with Lightning Locker disabled in Aura components. Use API version 40 or greater.</description>
<priority>1</priority>
<!-- This rule is associated with file extensions: .remoteSite, .xml -->
<properties>
<property name="xpath">
<value><![CDATA[
Expand All @@ -53,7 +51,6 @@ contains(upper-case(@Text),"GETSESSIONID")
<!-- TODO: NEED TO ADD IN externalInfoUrl ONCE WE HAVE A PERMANENT LOCATION FOR THE DOC PAGE -->
<description>Detects if &quot;Disable Protocol Security&quot; setting is true.</description>
<priority>3</priority>
<!-- This rule is associated with file extensions: .remoteSite, .xml -->
<properties>
<property name="xpath">
<value><![CDATA[
Expand All @@ -71,7 +68,6 @@ contains(upper-case(@Text),"GETSESSIONID")
<!-- TODO: NEED TO ADD IN externalInfoUrl ONCE WE HAVE A PERMANENT LOCATION FOR THE DOC PAGE -->
<description>Detects instances of a Remote Site Settings that use HTTP. Use HTTPS instead.</description>
<priority>3</priority>
<!-- This rule is associated with file extensions: .remoteSite, .xml -->
<properties>
<property name="xpath">
<value><![CDATA[
Expand Down
10 changes: 1 addition & 9 deletions packages/code-analyzer-pmd-engine/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,7 @@ export const DEFAULT_FILE_EXTENSIONS: Record<Language, string[]> = {

[Language.XML]: [
// FROM PMD's XmlLanguageModule:
'.xml',

// Salesforce metadata file extensions to associate to XML language, specifically for the AppExchange rules:
// Note: The metadata api pages over at
// https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm
// helps to list the file extensions for each metadata type. For example, the RemoteSiteSettings page
// https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_remotesitesetting.htm
// specifies that .remoteSite is the file extension for remote site settings files.
'.object', '.tab', '.remoteSite'
'.xml'
]
}

Expand Down

0 comments on commit 246441e

Please sign in to comment.