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

Bug: cortextool output lint going to stderr #254

Open
PatrikMuniak opened this issue Jun 7, 2022 · 0 comments
Open

Bug: cortextool output lint going to stderr #254

PatrikMuniak opened this issue Jun 7, 2022 · 0 comments

Comments

@PatrikMuniak
Copy link

I would expect when a rule doesn't fine any issues to have it's output to go to stdout and only when there are errors the output of that to go to stderr
I was testing the rules linter:

 ./cortextool rules lint rules/applications/nap-tom/cortex-rules.yaml > out 2>error

out: empty
error:

time="2022-06-07T14:25:04+01:00" level=info msg="SUCCESS: 1 rules found, 0 linted expressions"

if I put an error in the yaml rule file I get the same, empty out file and error file:

time="2022-06-07T14:31:37+01:00" level=error msg="unable parse rules file" error="yaml: line 6: could not find expected ':'" file=rules/applications/nap-tom/cortex-rules.yaml
cortextool: error: prepare operation unsuccessful, unable to parse rules files: file read error, try --help
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