check-contents seems to be defaulting to --all
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
`flow check-contents --help` lists this option:
```
--all Ignore absence of an @flow pragma
```
The existence of `--all` suggests that, by default, check-contents respects the absence of a @flow pragma. But this does not seem to be the case:
```
% flow version
Flow, a static type checker for JavaScript, version 0.54.1
% cat .flowconfig
[ignore]
[include]
[libs]
[lints]
[options]
% echo "class A extends B {}" | flow check-contents
Error: -:1
1: class A extends B {}
^ identifier `B`. Could not resolve name
Found 1 error
```
If I use the undocumented flag `--respect-pragma`, which I thought was the default, I get the behavior I'd expect without passing any flags:
```
% echo "class A extends B {}" | flow check-contents --respect-pragma
File is not @flow!
```
Contributor guide
Assessment
This issue has not been assessed yet.