JDK-8224228 : No way to locally suppress lint warnings in parser/tokenizer or preview features
  • Type: Task
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2019-05-20
  • Updated: 2025-01-22
Related Reports
Relates :  
Relates :  
Description
Text blocks introduces a lint warning for inconsistent indentation white space. Currently no way to suppress.

Same is true for preview features.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23237 Date: 2025-01-22 16:15:40 +0000
22-01-2025

Since @SuppressWarnings does not get interpreted until attribution, the only way to suppress parser/tokenizer lint warnings such as text-block is from the command line: -Xlint:-text-blocks .
30-08-2023

Does the DeferredLintHandler not help?
13-08-2021