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

explicitly return failure or success flag and reason on custom check functions #11

Open
uladkasach opened this issue Sep 13, 2021 · 0 comments

Comments

@uladkasach
Copy link
Member

make it so that when custom check functions are defined, throw => failed the file check and matches bad practice

maybe say:

  • throw new FoundBadPracticeError()
    and
  • throw new FoundBestPracticeError()

or just make us return { passed: "false" / "true", reason:"x"} && declarative files -> if they look like that they fail due to following bad practice, different than custom which specifies exactly whether file passes or fails

then this would also let us have better error messages

why?:

  • clearer definition of custom-checks on bad practices
    • i keep wanting to throw an error if the file fails my check (i.e., throw error -> file is bad practice)
  • ability to display failure reasons on bad practice
    • critical
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

No branches or pull requests

1 participant