Template Data Languages settings do not work for JSON?

I marked a directory containing my JSON files as "JavaScript Object
Notation" in hope Diana would stop running all inspections on these files
but still whole file is one big warning "Expression statemenr is not
assignment or call"
Is there anything I can do short of disablin inspections on file by file
basis or for all javascript?

Also very interestingly files with *.json extention do not get marked with
warning while any other extention (registered as javascript type) will cause
warnings


2 comments
Comment actions Permalink

Hello AlexR,

"Template Data Languages" doesn't allow you to mark an arbitrary file as
an arbitrary file type. It specifies that the templates (for example, FreeMarker
or Velocity) in these directories generate a specific language.

To disable the inspections for a certain part of your project, go to Settings
| Errors, create a project profile with the inspections disabled and assign
it to the directory containing JSON files.

And yes, IntelliJ IDEA detects JSON files by extension and disables certain
inspections for them automatically.

I marked a directory containing my JSON files as "JavaScript Object
Notation" in hope Diana would stop running all inspections on these
files
but still whole file is one big warning "Expression statemenr is not
assignment or call"
Is there anything I can do short of disablin inspections on file by
file
basis or for all javascript?
Also very interestingly files with *.json extention do not get marked
with warning while any other extention (registered as javascript type)
will cause warnings

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink


"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:63d8c2ccc2f338cb19f2cbf9fde8@news.jetbrains.com...

Hello AlexR,

>

"Template Data Languages" doesn't allow you to mark an arbitrary file as
an arbitrary file type. It specifies that the templates (for example,
FreeMarker or Velocity) in these directories generate a specific language.

>

To disable the inspections for a certain part of your project, go to
Settings | Errors, create a project profile with the inspections disabled
and assign it to the directory containing JSON files.

>

And yes, IntelliJ IDEA detects JSON files by extension and disables
certain inspections for them automatically.

>
>> I marked a directory containing my JSON files as "JavaScript Object
>> Notation" in hope Diana would stop running all inspections on these
>> files
>> but still whole file is one big warning "Expression statemenr is not
>> assignment or call"
>> Is there anything I can do short of disablin inspections on file by
>> file
>> basis or for all javascript?
>> Also very interestingly files with *.json extention do not get marked
>> with warning while any other extention (registered as javascript type)
>> will cause warnings
>>

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"

>



0

Please sign in to leave a comment.