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

feat discussion/req: customizable 'skipped' exit code for hook #2279

Closed
andrew-glenn opened this issue Mar 9, 2022 · 3 comments
Closed

feat discussion/req: customizable 'skipped' exit code for hook #2279

andrew-glenn opened this issue Mar 9, 2022 · 3 comments
Labels

Comments

@andrew-glenn
Copy link

I'm running into a use case where the identity library doesn't fully recognize CloudFormation templates (a superset of YAML/JSON). Rather than clutter the library with relatively niche use-case, I'd rather pass my custom hook all JSON/YAML files and have middleware determine which files to act on.

To that end, I'd like to signal back to pre-commit that the check should be flagged as SKIPPED (rather than passed). I'm proposing a skipped_exit_code parameter to each hook. The idea is that if the hook returns said exit code, it's marked as skipped.

Alternatively - I'm happy to submit a PR to the identity library adding CloudFormation support but I'm not sure it's a good fit and would require a fair amount of work (would need to further parse all JSON/YAML files to determine if they're CFN or not)

Thoughts?

@asottile
Copy link
Member

asottile commented Mar 9, 2022

no thanks -- this was discussed here: https://stackoverflow.com/a/71253727/812183

@andrew-glenn
Copy link
Author

You didn't answer the second half of my question - which is - do you feel that CloudFormation support in the identity project is a good fit? Would you support a PR to add it?

@asottile
Copy link
Member

asottile commented Mar 9, 2022

and here -- I'd recommend you do the same as the official cfn-lint: pre-commit/identify#281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants