Skip to content

[Enhancement] Show full path to file #410

@nathanpeck

Description

@nathanpeck

Is your feature request related to a problem? Please describe.

When I run cfn-guard against a directory path full of many files it is hard to tell which file is the source of an error.

For example:

cfn-guard validate --data ./pattern/**/files/*.yml --rules ./lint/guard

I am running the linter against all files with the .yml extension across a range of paths. There are multiple files with the same name in each subpath.

The output of the linter just shows:

cluster.yml Status = FAIL
FAILED rules
task-execution-role.guard/iam_policies_with_ecs_trust_policy_have_condition    FAIL

I know the error is in a file named cluster.yml, but which cluster.yml in which path?

Describe the solution you'd like

Compare to the output from cfn-lint:

E3001 Invalid or unsupported Type AWS::IAM::Rol for resource ECSTaskExecutionRole in us-east-1
./pattern/ecs-example-iam-roles/files/ecs-task-execution-role.yml:3:5

Because cfn-lint shows the full path to the file it is very easy for me to locate the file that needs a fix.

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