Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Problems, hints and quick fixes

The Problems panel runs along the bottom of the workspace. It lists what is wrong, or could be better, in every file of the project, not only the open one.

Reading the panel

The header sums up the project: ❌ 3 errors, ⚠ 2 warnings, or ✓ No problems. Click the header to fold or unfold the panel; drag its top edge to resize it.

Below, problems are grouped by file. Click a file name to fold its group. Each row shows:

❌ 14:12  unknown property `titel` in fact `hobbit`   [Replace with `title`]
          did you mean `title`?
PartMeaning
IconThe severity, see below.
line:colWhere the problem is. Click the row to open the file at that spot.
MessageWhat is wrong.
ButtonA quick fix, when there is one.
Second lineA hint on how to fix it, when the checker has one.

While your latest edit is being checked, the list is dimmed with ⟳ updating… and cannot be clicked, so you never apply a fix to a problem that is already gone.

Severities and filters

IconSeverityMeaningFilter
❌ErrorThe project does not compile, or compiles to something wrong.Errors
⚠️WarningCompiles, but is probably a mistake or breaks a convention.Warnings
💡 / ℹ️Hint / InfoStyle suggestions. They are listed here but not underlined in the editor.Hints

Untick a filter to hide that severity. The counts in the header always include everything.

The file tree also shows error and warning counts next to each file.

Quick fixes

A problem with a mechanical fix has a button on its row, labelled with what it will do. Click it to apply the edit. The same fix is offered in the editor, as a 💡 … — click to insert line above the block and in the tooltip of the underlined text (see The Dolfin editor).

A fix can change another file than the one with the problem. It is saved like any edit, and the problem disappears once the project is checked again.

FixOffered for
Declare concept XA reference to a concept that does not exist. Adds concept X to the current file.
Declare concept X in fileThe same, when the name points to another file of the project (for example animals.Dog). Adds the declaration at the end of that file.
Create file and declare concept XThe same, when that file does not exist yet.
Replace with ‘…’ / Replace with qualified name ‘…’A misspelled type or property that is close to an existing one.
Rename to ‘…’A concept not in PascalCase or a property not in camelCase. Renames the declaration and its uses.
Wrap word in backticks to use it as a nameA keyword used where a name is expected, for example has date: date. Turns it into `date`. Not offered when no name could go there (e.g. concept Foo is).
Remove trailing whitespaceSpaces at the end of a line.
Remove extra blank linesMore than two blank lines in a row.

What is checked

Besides syntax errors, which come with a hint when the parser can guess what you meant, the checker reports the following. For what the language allows, see the Dolfin language documentation.

Errors

MessageWhy
Unresolved type ‘X’ in … of ‘Y’A field, sub or range names a type that is not declared. When a close name exists, the message ends with Did you mean …? and a fix is offered.
Circular inheritance detected for concept ‘X’X is, through sub, its own ancestor.
Duplicate property ‘p’ in concept ‘X’The concept declares has p twice.
unknown property p in …A query, rule or fact uses a property that does not exist. When a close name exists, the hint line says did you mean …? and a fix is offered.
Silent variable ‘?_x’ cannot appear in the return block of query ‘q’?_ variables mean “value not needed”; they cannot be returned.
Query ‘q’ composes undefined query ‘r’A query builds on a query that does not exist.
Query ‘q’ has a circular composition dependencyQueries that compose each other in a loop.

Warnings

MessageWhy
Concept ‘x’ should be PascalCaseNaming convention. Fix: Rename to ‘X’.
Property ‘X’ should be camelCaseNaming convention. Fix: Rename to ‘x’.
Enum variant ‘x’ should be UPPER_CASE or PascalCaseNaming convention for the values of a one of: block: RED or Red, not red. No automatic fix, pick one style yourself.
Prefix ‘p’ is declared but never usedLeftover prefix line.
Variable ‘?x’ in rule ‘r’ appears only onceThe variable neither joins two match lines nor reaches then. Usually a typo. If it is on purpose, name it ?_x.
Variable ‘?x’ in query ‘q’ appears only onceUsually a typo. If it is on purpose, name it ?_x.
`=` / `!=` on a quantity is unreliable after unit normalisationTwo equal quantities in different units may not compare equal. Use >, <, >= or <=.

Hints

MessageWhy
Trailing whitespace on line NFix: Remove trailing whitespace.
Too many consecutive blank linesFix: Remove extra blank lines.
Declarations should come after all prefix declarationsPut prefix lines at the top of the file.

When the project does not compile

The outputs keep the last version that compiled, dimmed, with a note such as Showing the last valid graph; the current source doesn’t parse yet. See Problems below. The Turtle download is disabled until the errors are fixed. See Compiled output.