pbiplint 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/dist/pbiplint.mjs +595 -122
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,8 +4,10 @@ Best-practice linter for Power BI projects. Point it at a PBIP folder, a `.pbip`
|
|
|
4
4
|
`.SemanticModel` folder, a `.Report` folder, a `definition` folder, or one `.tmdl` file and get
|
|
5
5
|
ranked findings with a link to a fix page for each rule, and, when the input has a report, a
|
|
6
6
|
"Report at a glance" block that says what the report will do when someone opens it. Nothing is
|
|
7
|
-
uploaded: it reads the files you name and writes to your terminal
|
|
8
|
-
|
|
7
|
+
uploaded: it reads the files you name and writes to your terminal, and
|
|
8
|
+
[the pbiplint Privacy Promise](https://pbiplint.com/privacy/) says what that covers. Node 20.19 or a
|
|
9
|
+
later 20 release, or 22.12 or later. [The pbiplint CLI](https://pbiplint.com/cli/) page on the site has more:
|
|
10
|
+
where to get it, what it reads, and how to check that it sends nothing.
|
|
9
11
|
|
|
10
12
|
```bash
|
|
11
13
|
npx pbiplint path/to/Model.SemanticModel
|
|
@@ -18,10 +20,19 @@ npx pbiplint --version
|
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
Formats: `text` (default), `json`, `sarif` (for GitHub code scanning and editors), `markdown`.
|
|
23
|
+
The Markdown export writes an email address, an `@name`, a `#123` or `GH-123`, and text
|
|
24
|
+
holding two or more `$` as code, so pasted into a GitHub issue or comment it links no one,
|
|
25
|
+
notifies no one, and renders no math.
|
|
21
26
|
|
|
22
27
|
Exit codes: `0` no findings at or above `--fail-on`, `1` findings, `2` usage or input error.
|
|
23
28
|
`--fail-on error` is the default; `--fail-on warning` and `--fail-on info` tighten the gate;
|
|
24
|
-
`--fail-on none`
|
|
29
|
+
`--fail-on none` exits 0 on any run that lints something. A run that can read nothing in the input,
|
|
30
|
+
such as a report saved as a single `report.json` (PBIR-Legacy) with no model beside it, exits `2`
|
|
31
|
+
and says why, rather than passing with no findings.
|
|
32
|
+
|
|
33
|
+
Pointed at a folder that is not a project but holds one in a folder below it, as a repository
|
|
34
|
+
often does, pbiplint lints that project and names it in a notice. A folder that holds several exits
|
|
35
|
+
`2` and lists them, each with the command that lints it.
|
|
25
36
|
|
|
26
37
|
## Configuration
|
|
27
38
|
|
|
@@ -60,12 +71,18 @@ page.json or visual.json (Power BI Desktop keeps it there too):
|
|
|
60
71
|
## What it checks
|
|
61
72
|
|
|
62
73
|
Every rule from the Microsoft Best Practice Analyzer ruleset, ported so the results match Tabular
|
|
63
|
-
Editor on the same model, with
|
|
74
|
+
Editor on the same model, with eleven documented deviations where the source is noisier, or quieter,
|
|
64
75
|
than it means to be; and pbiplint's own rules for a year or a date fixed in DAX, such as a measure
|
|
65
|
-
filtered to 2025 or a date table that ends in 2026,
|
|
66
|
-
calls, has a one-word name, or has no description
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
filtered to 2025 or a date table that ends in 2026, for a DAX user-defined function that nothing
|
|
77
|
+
calls, has a one-word name, or has no description, for a visible name that a translated culture
|
|
78
|
+
gives no caption, and for a visible decimal column with no format string. Four of pbiplint's own
|
|
79
|
+
model rules take their test from Tabular Editor's rules, from Tabular Editor 3's built-in set or the
|
|
80
|
+
community's published rule files, and are checked against Tabular Editor on the same model. Five of
|
|
81
|
+
the Microsoft rules need statistics only a live model has; they are listed but not run. A column
|
|
82
|
+
whose TMDL names no type, as Power BI Desktop saves most calculated columns, is left out of the
|
|
83
|
+
thirteen ported rules that test a column's type, where Tabular Editor reads the type from the
|
|
84
|
+
column's DAX. Each rule has a page at https://pbiplint.com/rules with what it checks, why, how to
|
|
85
|
+
fix it, and quirks.
|
|
69
86
|
|
|
70
87
|
The report layer (PBIR) is read beside the model: a `.Report` folder alone is valid input, and with
|
|
71
88
|
the model beside it the two are paired through `definition.pbir` and checked together. The report
|