Skip to content

COR005 rename suggestion drops word breaks, and COR005 and COR004 fire on imported CloudFormation ids #5078

Closed

Description

@lex00

Found with chant 0.124.95 while reading a clone of kubernetes/k8s.io at commit 2b3d9153 offline, for #5067.

COR005 suggests a rename that drops the word breaks from an identifier that starts with an acronym.

On imported CloudFormation logical ids:

  • TFStateBucket is suggested as tfstatebucket
  • OBSAdminUser is suggested as obsadminuser

Expected tfStateBucket and obsAdminUser.

Separately, firing COR005 on every logical id of an imported template is noise: the ids are the template's, and renaming them changes the CloudFormation resources. COR004 has the same problem on ManagedPolicy resources, which nothing references because CloudFormation attaches them by their own properties. Imported source could carry a marker that these two rules respect.

Wanted:

  • The camel-case conversion keeps word breaks after a leading acronym.
  • COR005 and COR004 skip, or report once per file at info level, declarations that came from chant import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lintbugepic:estate-read

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions