I don’t think simply making Syntax warnings filterable fully covers my use case if the direction is to warn about more things that are intended to remain in the language and which may be valid.
Part of the reason I use warnings in CI is to catch issues with dependencies. We have the resources at work to work with upstream libraries to help fix the things we rely on, but not to the extent of even caring about code paths we don’t use within those dependencies.
Syntax deprecations would matter, because if in the future the library won’t even import due to a syntax error, that’s within what we care about, but syntax warnings for valid syntax when a file is compiled are not really.
This is an awkward limitation even with filtering because of how and when these are emitted.
It may be worth changing syntax warnings to be changed so that the ast construction inserts a warning that is emitted when the line of code in question is reached at runtime, making it an actual runtime warning associated with a module and line of code, and having a separate setting to control whether warnings are also emitted for syntax warnings at compile time.
I don’t think syntax deprecation warnings should have the same treatment, because syntax deprecation indicates that in the future, it may not even be possible to compile the file.
The other option that I’ve given significant thought to at this point is to actively discourage use of warnings as errors in workflows that need stability, but provide a structured, documented, and stable output for those who want to do more with warnings. I’d be willing to spend time designing, contributing, and even maintaining this. This frees up the ability to stop worrying about some of the reasons warnings are disruptive, but I’m not sure if it helps with all of them. @pf_moore 's case of not wanting any unexpected output from an application is one I wasn’t previously aware of.
If it does adequately make adding warnings less disruptive for existing users, then this option gives more latitude to start warning for more things that are tricky edge cases within the language that have a reason to exist, but that we also want to ensure people are only using with intention and understanding.