facebook / facebook/flow

Add max_warnings config option to `.flowconfig` file

Open
#8,240 0 comments 4 reactions 0 assignees View on GitHub
discussion
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

# Proposal
There is currently a way to pass a `--max-warnings 0` argument to the `flow-cli`, but it is not possible to configure it in the `.flowconfig` file. I propose adding a `max_warnings` config option.

## Use case
I would like to keep the output of `flow` clean with 0 warnings and 0 errors. Currently, the CI does not fail on Warnings, so from time to time some warnings slip into the codebase. My current repository contains multiple services, where each service can call `flow` in their scripts. Adding a CLI argument will need to be repeated in multiple places in this case. All projects share a single `.flowconfig` file, so it would be great if the option can be configured in it.

See related issues:
* https://github.com/facebook/flow/issues/5009
* https://github.com/facebook/flow/issues/5612#issuecomment-357560355 (an alternative approach to elevate "Unused suppression comment." warnings to errors)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.