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

Deprecate requesting codemods by name #699

Merged
merged 4 commits into from
Jul 9, 2024
Merged

Deprecate requesting codemods by name #699

merged 4 commits into from
Jul 9, 2024

Conversation

clavedeluna
Copy link
Contributor

@clavedeluna clavedeluna commented Jul 8, 2024

Overview

Codemods can now only be requested by id

We still have the ability to initialize a codemod by a name, but it's now know that this may not be a unique name since multiple tools could have the same codemod name. So codemods can now only be requested by id.

I changed all important locations, while some locations still use codemod.name. I also made a wrapper called _internal_name to indicate that the places we're using that it's for the internal semgrep call.

Closes #697

Future work: I can remove the -semgrep suffix in the first semgrep codemod I recently added since it's so new, but do we want to also go back and rename all the sonar codemods that have -id suffix?

Copy link

sonarcloud bot commented Jul 8, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@clavedeluna clavedeluna marked this pull request as ready for review July 8, 2024 15:01
Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

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

Thank you @clavedeluna, looks really good.

@clavedeluna clavedeluna added this pull request to the merge queue Jul 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 9, 2024
@clavedeluna clavedeluna added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit 804da0d Jul 9, 2024
13 checks passed
@clavedeluna clavedeluna deleted the deprecate-names branch July 9, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate CodemodRegistry _codemods_by_name and codemod names in general
3 participants