mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
23
javascript/ql/src/LanguageFeatures/WrongExtensionJSON.qhelp
Normal file
23
javascript/ql/src/LanguageFeatures/WrongExtensionJSON.qhelp
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE qhelp PUBLIC
|
||||
"-//Semmle//qhelp//EN"
|
||||
"qhelp.dtd">
|
||||
<qhelp>
|
||||
|
||||
<overview>
|
||||
<p>
|
||||
JSON data should normally be stored in files with extension 'json'. If it is stored in files
|
||||
with extension 'js' or 'jsx' (which are normally associated with JavaScript), developers might
|
||||
attempt to parse or execute the JSON data as JavaScript, which can lead to parse errors.
|
||||
</p>
|
||||
</overview>
|
||||
|
||||
<recommendation>
|
||||
<p>
|
||||
Rename the file to have extension 'json'.
|
||||
</p>
|
||||
</recommendation>
|
||||
|
||||
<references>
|
||||
<li>Internet Engineering Taskforce: <a href="https://tools.ietf.org/html/rfc7159">RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format</a>.</li>
|
||||
</references>
|
||||
</qhelp>
|
||||
Reference in New Issue
Block a user