Skip to content

[Feature]: Emit a warning in console that codemod may not handle all cases #676

@trivikr

Description

@trivikr

Self-service

  • I'd be willing to implement this feature

Problem

Reading the current README.md of project, some users might incorrectly assume that aws-sdk-js-codemod does all transformations, and the emitted code will work without any changes. There's a possibility that they might push these changes to production without review or testing.

This should be documented in README, and a warning when running the codemod.

What needs to be informed:

  • Codemod does not transform all cases.
  • Review the code for functionality before pushing to production.
  • If some cases are not transformed, or incorrectly transformed, please create an issue on Github

Solution

Emit a warning for every run of codemod, and provide an option to disable it.

For example:

$ npx aws-sdk-js-codemod@latest -t v2-to-v3 PATH...
...
╔════════════════════════════════════════════════════════╗
║ Codemod may not handle all cases during transformation.║
║                                                        ║
║ Please review the code change thoroughly for required  ║
║ functionality before deploying it to production.       ║
║                                                        ║
║ If the transformation is not complete or is incorrect, ║
║ please report the issue on GitHub.                     ║
╚════════════════════════════════════════════════════════╝
...

Also add this disclaimer in README.

Alternatives

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions