SSMS v18.1 incorrectly flags batch repeater as invalid syntax
SQL Server Management Studio incorrectly flags the repeat count on the GO command/statement as invalid syntax.
SELECT 1 AS [Field]
When executed, the above will repeat the batch 10 times. This is documented in the SQL Server documentation on the GO command/statement:
In SSMS v18.1, the syntax checker will highlight the number 10 indicating an error. The hover text for the error reads "Incorrect syntax near '10'." This error is not correct.
Executing the batch performs as expected. The batch is executed 10 times.
This is a rarely used feature of the GO command/statement, but it is still valid.