Skip to content

Commit 2f918eb

Browse files
docs: document lint warnings and upload sanitization for empty dashboard filters
1 parent ddc1f16 commit 2f918eb

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

guides/cli/how-to-use-lightdash-lint.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@ Example output:
5353
Found 1 error in 1 file
5454
```
5555

56+
## Errors vs. warnings
57+
58+
`lightdash lint` reports two severities:
59+
60+
- **Errors** (red ``) — schema validation failures. These cause the command to exit with a non-zero status, so they fail CI.
61+
- **Warnings** (yellow ``) — non-fatal issues that don't block deployment but signal a configuration that's likely to behave unexpectedly. Warnings do **not** affect the exit code.
62+
63+
### Malformed empty dashboard filters
64+
65+
Dashboard YAML can include filters that are active (`disabled: false`) but have no values (`values: []` or `values: ~`) on an operator that requires values (for example, `equals` or `greaterThan`). These filters look empty in the UI but silently override chart-level filters at runtime.
66+
67+
`lightdash lint` flags them as warnings so you can find and fix them in your YAML:
68+
69+
```
70+
⚠ ./lightdash/dashboards/revenue.yml
71+
filters.dimensions[0]: dashboard filter is active but has no values — it will override chart filters at runtime
72+
```
73+
74+
To resolve the warning, either remove the filter, set `disabled: true`, or provide values. When you next run `lightdash upload`, the CLI also strips these filters from the payload automatically and prints a warning listing which dashboards were affected.
75+
5676
### Verbose output
5777

5878
Use `--verbose` to see all validated files, including those that passed:

references/lightdash-cli.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,10 @@ Uploads charts and dashboards that you've made changes to from the `lightdash/`
699699

700700
If there have been changes made to a chart or dashboard in the application that is being uploaded from code, `lightdash upload` will overwrite the changes.
701701

702+
<Note>
703+
`lightdash upload` automatically drops malformed empty dashboard filters (active filters with no values on operators that require values) from the payload before sending it to the API. When this happens, the CLI prints a warning listing the affected dashboards and recommends running [`lightdash lint`](/references/lightdash-cli#lightdash-lint) to locate the offending filters in your YAML.
704+
</Note>
705+
702706
**Options:**
703707

704708
- `--force`
@@ -984,6 +988,15 @@ Output results in SARIF JSON format (useful for CI/CD integration):
984988
lightdash lint --format json
985989
```
986990

991+
**Errors and warnings:**
992+
993+
Lint results are reported at two severities:
994+
995+
- **Errors** (``, red) — schema validation failures. The command exits with a non-zero status, failing CI.
996+
- **Warnings** (``, yellow) — non-fatal issues like malformed empty dashboard filters (active filters with no values on operators that require them). Warnings don't change the exit code.
997+
998+
See [How to use lightdash lint](/guides/cli/how-to-use-lightdash-lint#errors-vs-warnings) for details.
999+
9871000
### `lightdash pre-aggregate-audit`
9881001

9891002
Reports pre-aggregate hit/miss coverage for one dashboard or every dashboard in the project. Use it to find gaps in your pre-aggregate YAML or to gate CI on dashboard coverage.

0 commit comments

Comments
 (0)