# Scan SQL scripts inside JS files

**URL:** <https://community.sonarsource.com/t/scan-sql-scripts-inside-js-files/48259>\
**Category:** SonarQube Server / Community Build\
**Tags:** plsql, mysql, mssql, tsql\
**Created:** [August 18, 2021, 5:43am UTC](https://community.sonarsource.com/t/scan-sql-scripts-inside-js-files/48259 "2021-08-18T05:43:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick.pham.hcl](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nick.pham.hcl](https://community.sonarsource.com/u/nick.pham.hcl)\
**Post date:** [August 18, 2021, 5:43am UTC](https://community.sonarsource.com/t/scan-sql-scripts-inside-js-files/48259/1 "2021-08-18T05:43:23Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  - Developer edition, version 9.0.1

- what are you trying to achieve
  - Scan SQL scripts in JS files
  - Our JS files need to run knex scripts to make updates in our SQL databases, and such updates were written in SQL
  - We would like to know whether (and how) SonarQube can scan SQL scripts inside “.js” files please

- what have you tried so far to achieve this
  - added “sql” as suffix to PL/SQL and “.sql” to “T-SQL” but no luck

Thank you

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 18, 2021, 5:34pm UTC](https://community.sonarsource.com/t/scan-sql-scripts-inside-js-files/48259/2 "2021-08-18T17:34:42Z")

</div>

Hi,

In general, cross-language analysis within files is very much the exception rather than the rule. And it’s simply not available for SQL inside of `.js` files.

&nbsp;  
🤷‍♀️  
Ann
