Skip to content

[BUG][code-analyzer] Regex producing EMFILE: too many open files #1832

@Windyo

Description

@Windyo

Have you tried to resolve this issue yourself first?

  • I confirm I have gone through the above steps and still have an issue to report.

Bug Description

The Regex engine uses the following regex to determine if a file extension is valid: /^([.][a-zA-Z0-9-_]+)+$/
in the case of a Salesforce project, if you want to parse "meta" files, this forces the extension to be .xml
This results in
Error (1): EMFILE: too many open files, open 'myfile'

The regex should be extended, and I offer /^[a-zA-Z0-9-_.]*([.][a-zA-Z0-9-_]+)+$/

In general, EMFILE seems to mean that Node is processing all files at once, which also should be modified, but is less important with the above change.

Output / Logs

Error (1): EMFILE: too many open files, open 'myfile'

Steps To Reproduce

  1. Create a new regex config to parse Meta files (examples include Field namings)
  2. Realize the above.

Expected Behavior

my-stuff.thing should be a valid extension.

Operating System

Win11@latest

Salesforce CLI Version

@salesforce/cli/2.89.8 win32-x64

Code Analyzer Plugin (code-analyzer) Version

code-analyzer 5.1.0

Node Version

node-v22.15.0

Java Version

No response

Python Version

No response

Additional Context (Screenshots, Files, etc)

No response

Workaround

No response

Urgency

Low

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUG P3Rarely Malfunction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions