Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide/cancel the "No data sources are configured to run this SQL" message in Intellij

I could not find any way to hide this warning in Intellij:

No data sources are configured to run this SQL and provide advanced code assistance

enter image description here

What is the magic combination of settings to make this go poof?

like image 890
WestCoastProjects Avatar asked Jan 29 '26 17:01

WestCoastProjects


2 Answers

There does not appear to be any setting that actually works. Instead it's actually pretty easy to create a "fake" sql source.

  • Click on Configure data source link in upper right
  • Select "SQL" (generic one)
  • Don't worry about the (bogus) connection parameters: just go ahead and "Save" it

The fake connection will not cause issues and now the SQL will be parsed and that message goes .. poof !

like image 158
WestCoastProjects Avatar answered Feb 03 '26 11:02

WestCoastProjects


I had this for a typescript project, the following comment disables the warning for the specific line

// noinspection SqlNoDataSourceInspection

Other languages may have different notations but SqlNoDataSourceInspection should be the name for all.

like image 21
Motti Avatar answered Feb 03 '26 09:02

Motti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!