mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-09-19 09:28:06 +03:00
967da232d3
Problem: we have two major use cases: 1. Using xrefcheck in CI, in this case it is annoying for devops to always pass mostly always reasonable `--no-progress` option. 2. Using it locally, here we want progress bar to be enabled by default so that user could run `xrefcheck` without any options most of the time. Solution: Detect whether are we running in CI and use the respective default for whether progress bar should be displayed. Detecting whether we are within CI is possible using `CI` env variable, at least Github actions, Gitlab CI and Buildkite pass this env. `--no-progress` option still can be passed if user wants to suppress progress bar in local run. The opposite `--progress` seems to also make sense, because in case if high timeouts are set, user probably wants to track progress somehow to make sure that CI didn't hang. So we add the latter, and these two options can be used to override the default behaviour defined by `CI` env var. |
||
---|---|---|
.. | ||
Main.hs |