Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Make comment detection RegEx legible  #416

@baristaGeek

Description

@baristaGeek

In detectConsoleLogs.ts we have the consoleLogRegex variable. It's a RegEx literal that will keep growing.

We can do something like the following to keep this RegEx more legible:

const consoleLogsByLanguage = [
   "(console\.log"
   "print"
   // Add the syntax of each language 
]

And then concat this into the RegEx literal. This possibly looks similar to this:

const consoleLogRegex = consoleLogsByLanguage.map(element => element).join('');

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions