Syntax Warnings

The Wolfram Workbench provides a mechanism for giving reports on errors and problems in your code. These are updated as you type into a source file and they are updated when you save a file. Finally, when the Mathematica builder runs on a file or group of files this also updates the reports.


The warning system produces similar reports to the error system. The actual markup is less intrusive because these are warnings rather than errors. A sample warning is shown below.


This warning arises because the Sin function does not take two arguments.

Code Warnings

One category of warnings consists of the wrong number of arguments or the wrong type of arguments. An example is the warning given above. These warnings are loaded from a file that is present in Mathematica itself.

At the present there is no way to add your own function definitions from your project to this list.

A useful warning comes when you forget to give an argument to a function. This is demonstrated in the following.


Another useful warning comes when you forget to add a semicolon at the end of the line. This is shown below.


Invalid attributes will be marked as a warning.

Attributes Warning

Unused local variables or function arguments will be marked so that they can be removed. In the following, the local variable z is not used and a warning is generated.

Unused variable warning

Test File Warnings

Test expressions with missing or empty test identifiers will be marked. Quick fixes are available for correcting these issues.

Template Warnings

Another category of warnings comes from warning patterns. How to use these warnings is described in the reference to the warnings and fixes preferences.