pbiplint 0.1.1 → 0.2.0
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/NOTICE +27 -0
- package/README.md +34 -8
- package/dist/pbiplint.mjs +12628 -2800
- package/package.json +5 -3
- package/sample/Messy Sales Demo.Report/.platform +11 -0
- package/sample/Messy Sales Demo.Report/definition/bookmarks/bookmarks.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/bookmarks/f56cd9f5f68d30c0e4e3.bookmark.json +41 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3130cf9463309528054d/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3e7724efa859ff7b9701/visual.json +130 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3fe8e6907656325b8e86/visual.json +187 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/51bb4f6f5f7f71ed0a3c/visual.json +69 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/d2995ea3e9b9d9244bf6/visual.json +31 -0
- package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/d307b6575ca81d163aac/visual.json +186 -0
- package/sample/Messy Sales Demo.Report/definition/pages/27f668864829019f9251/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/27f668864829019f9251/visuals/1e7f28bf49e435b68c50/visual.json +156 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/6c96585893b6f603b9ac/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/6e99982d842b0d962e16/visual.json +189 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/8081f5bb7075e7b008bc/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/c5147d97ff0b18a24336/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3b33a1ae720bb93d48b9/page.json +48 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3b33a1ae720bb93d48b9/visuals/e32acaa3eb3e6dd81dca/visual.json +195 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/23f7a6962538ec0c0ff4/visual.json +155 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/2b5386e9de3e1fbb1afa/visual.json +147 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/307e834045a168e7a394/visual.json +305 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/4457e97e02f61c8f609b/visual.json +176 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/49158e1e7dce5e8d37fd/visual.json +68 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/6500e9c3f9d74f2958c7/visual.json +312 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/6edcdc464f4016c0264c/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/88530bc0f64114317e2e/visual.json +155 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/a75a96eee1fd0cf4cef7/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/bda61916a7b1efdee3fe/visual.json +145 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/d93ac3d110ff0a347497/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/db47426e580241dac6b8/visual.json +104 -0
- package/sample/Messy Sales Demo.Report/definition/pages/52db6f0b218c638f8761/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/52db6f0b218c638f8761/visuals/8edac00805f721edc1c1/visual.json +196 -0
- package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/598cfda00746e83f4896/visual.json +162 -0
- package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/6c71af13bcdb4c28cce8/visual.json +133 -0
- package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/8aa02d4e168b39268df4/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/ab6166569dd355894dc2/visual.json +192 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/05d453611bc204914797/visual.json +291 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/0dcfd84094ee2cfe485b/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/11146719bd576271e11a/visual.json +238 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/338338c16a0d509bdaf5/visual.json +238 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/3ee96306fb282e5dfe38/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/404c49f853ea8dde3b6c/visual.json +238 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/55ddee811456e2b049cf/visual.json +291 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/5bf9a67d54ba75bb7be1/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/63f71d3b642fb6c8a9ba/visual.json +291 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/80873270a475b81ef0fb/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/838ab6226a66fdfb13dc/visual.json +238 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/9b12811305cdd50a97c4/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/a1a8f953ebef2d733956/visual.json +291 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/b7e7f7c15ff9284e72d3/visual.json +291 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/b9229ce2b277de70e402/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/cf88d237300a7d6a6709/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/d66ccf48cfa017d01124/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/d8ab941db2b7bd34c19e/visual.json +238 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/daadba18a786c3e25d97/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/e1552553ac4f0856010e/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/f108285d5ebc6bcdba77/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/b52832c4d9f487868953/page.json +9 -0
- package/sample/Messy Sales Demo.Report/definition/pages/b52832c4d9f487868953/visuals/2a7e16428070011e60ec/visual.json +55 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/3fa0fc35d2dd20b9b1f2/visual.json +186 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/55b04f4555a4615ecd32/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/94c00b0b84a51b0e0b39/visual.json +140 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/acc24e8136085a985f3f/visual.json +32 -0
- package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/de6a17691cc952e6d7dd/visual.json +120 -0
- package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/page.json +8 -0
- package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/visuals/27e669b1ee2de2c3ac9d/visual.json +96 -0
- package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/visuals/b230f06615cf87ee455f/visual.json +185 -0
- package/sample/Messy Sales Demo.Report/definition/pages/pages.json +17 -0
- package/sample/Messy Sales Demo.Report/definition/report.json +66 -0
- package/sample/Messy Sales Demo.Report/definition/reportExtensions.json +46 -0
- package/sample/Messy Sales Demo.Report/definition/version.json +4 -0
- package/sample/Messy Sales Demo.Report/definition.pbir +9 -0
- package/sample/{.platform → Messy Sales Demo.SemanticModel/.platform } +1 -1
- package/sample/Messy Sales Demo.SemanticModel/definition/cultures/en-US.tmdl +32 -0
- package/sample/Messy Sales Demo.SemanticModel/definition/database.tmdl +3 -0
- package/sample/{definition/model.tmdl → Messy Sales Demo.SemanticModel/definition/model.tmdl } +3 -0
- package/sample/{definition/relationships.tmdl → Messy Sales Demo.SemanticModel/definition/relationships.tmdl } +6 -0
- package/sample/{definition/tables/Customer.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Customer.tmdl } +5 -0
- package/sample/Messy Sales Demo.SemanticModel/definition/tables/DateTableTemplate_96ead6f8-eef3-4336-a020-6641aa278e92.tmdl +118 -0
- package/sample/Messy Sales Demo.SemanticModel/definition/tables/Employee Grouping.tmdl +49 -0
- package/sample/Messy Sales Demo.SemanticModel/definition/tables/LocalDateTable_b6c07c62-ecbc-4f14-b072-2fb027697b1d.tmdl +116 -0
- package/sample/{definition/tables/Sales.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Sales.tmdl } +42 -42
- package/sample/{definition/tables/Store.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Store.tmdl } +15 -0
- package/sample/Messy Sales Demo.pbip +14 -0
- package/sample/pbiplint.config.json +7 -0
- package/sample/.pbi/editorSettings.json +0 -8
- package/sample/definition/cultures/en-US.tmdl +0 -2
- package/sample/definition/database.tmdl +0 -3
- /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Date.tmdl +0 -0
- /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Employee.tmdl +0 -0
- /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Product.tmdl +0 -0
- /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Promotion.tmdl +0 -0
- /package/sample/{definition.pbism → Messy Sales Demo.SemanticModel/definition.pbism} +0 -0
package/NOTICE
CHANGED
|
@@ -27,3 +27,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
27
27
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
28
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
29
|
SOFTWARE.
|
|
30
|
+
|
|
31
|
+
pbiplint also bundles rule metadata derived from Rules/Base-rules.json and
|
|
32
|
+
test fixtures derived from FabInspector.Tests/Files/pbip in the
|
|
33
|
+
NatVanG/fab-inspector repository (https://github.com/NatVanG/fab-inspector),
|
|
34
|
+
which is licensed under the MIT License:
|
|
35
|
+
|
|
36
|
+
MIT License
|
|
37
|
+
|
|
38
|
+
Copyright (c) 2024 Nat Van Gulck
|
|
39
|
+
|
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
42
|
+
in the Software without restriction, including without limitation the rights
|
|
43
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
45
|
+
furnished to do so, subject to the following conditions:
|
|
46
|
+
|
|
47
|
+
The above copyright notice and this permission notice shall be included in all
|
|
48
|
+
copies or substantial portions of the Software.
|
|
49
|
+
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
# pbiplint
|
|
2
2
|
|
|
3
|
-
Best-practice linter for Power BI
|
|
4
|
-
folder,
|
|
5
|
-
|
|
3
|
+
Best-practice linter for Power BI projects. Point it at a PBIP folder, a `.pbip` file, a
|
|
4
|
+
`.SemanticModel` folder, a `.Report` folder, a `definition` folder, or one `.tmdl` file and get
|
|
5
|
+
ranked findings with a link to a fix page for each rule, and, when the input has a report, a
|
|
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. Node 20.19 or later (or 22.12
|
|
8
|
+
or later).
|
|
6
9
|
|
|
7
10
|
```bash
|
|
8
11
|
npx pbiplint path/to/Model.SemanticModel
|
|
9
|
-
npx pbiplint --sample # a bundled model with planted violations
|
|
12
|
+
npx pbiplint --sample # a bundled project, a model and its report, with planted violations
|
|
10
13
|
npx pbiplint path/to/model --format sarif --output pbiplint.sarif
|
|
11
14
|
npx pbiplint path/to/model --format markdown
|
|
12
15
|
npx pbiplint rules # every rule with status and severity
|
|
16
|
+
npx pbiplint --help # every option, in one screen
|
|
17
|
+
npx pbiplint --version
|
|
13
18
|
```
|
|
14
19
|
|
|
15
20
|
Formats: `text` (default), `json`, `sarif` (for GitHub code scanning and editors), `markdown`.
|
|
16
21
|
|
|
17
|
-
Exit codes: `0` no findings at or above `--fail-on
|
|
18
|
-
|
|
22
|
+
Exit codes: `0` no findings at or above `--fail-on`, `1` findings, `2` usage or input error.
|
|
23
|
+
`--fail-on error` is the default; `--fail-on warning` and `--fail-on info` tighten the gate;
|
|
24
|
+
`--fail-on none` always exits 0.
|
|
19
25
|
|
|
20
26
|
## Configuration
|
|
21
27
|
|
|
@@ -33,6 +39,9 @@ picks one explicitly):
|
|
|
33
39
|
}
|
|
34
40
|
```
|
|
35
41
|
|
|
42
|
+
A rule that takes options is set with an object, such as
|
|
43
|
+
`"REDUCE_VISUALS_ON_PAGE": { "severity": "error", "max": 15 }`; each rule's page lists its options.
|
|
44
|
+
|
|
36
45
|
To ignore a rule on one object, annotate it in TMDL (Power BI Desktop keeps the annotation):
|
|
37
46
|
|
|
38
47
|
```
|
|
@@ -41,17 +50,34 @@ To ignore a rule on one object, annotate it in TMDL (Power BI Desktop keeps the
|
|
|
41
50
|
annotation pbiplint.ignore = HIDE_FOREIGN_KEYS, MARK_PRIMARY_KEYS
|
|
42
51
|
```
|
|
43
52
|
|
|
53
|
+
To ignore a report rule on one page or visual, add the annotation to the `annotations` array of its
|
|
54
|
+
page.json or visual.json (Power BI Desktop keeps it there too):
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
"annotations": [{ "name": "pbiplint.ignore", "value": "ENSURE_ALTTEXT" }]
|
|
58
|
+
```
|
|
59
|
+
|
|
44
60
|
## What it checks
|
|
45
61
|
|
|
46
62
|
Every rule from the Microsoft Best Practice Analyzer ruleset, ported literally so the numbers match
|
|
47
63
|
Tabular Editor. Five rules need statistics only a live model has; they are listed but not run. Each
|
|
48
64
|
rule has a page at https://pbiplint.com/rules with what it checks, why, how to fix it, and quirks.
|
|
49
65
|
|
|
66
|
+
The report layer (PBIR) is read beside the model: a `.Report` folder alone is valid input, and with
|
|
67
|
+
the model beside it the two are paired through `definition.pbir` and checked together. The report
|
|
68
|
+
rules are the 11 base rules of PBI Inspector by Nat Van Gulck, ported so the results match its
|
|
69
|
+
command line on the same report, with six documented deviations, and pbiplint's own rules for a
|
|
70
|
+
report's correctness and readiness and for the model objects the report never reaches. When the
|
|
71
|
+
input has a report, the "Report at a glance" block states what the report will do when someone
|
|
72
|
+
opens it, whether or not anything fired. A notice names anything about the input a reader must
|
|
73
|
+
know, such as a file that could not be read or a `definition.pbir` that points at a model other
|
|
74
|
+
than the one beside it.
|
|
75
|
+
|
|
50
76
|
The same linter runs in the browser at https://pbiplint.com. Source, issues, and contributing:
|
|
51
77
|
https://github.com/pbiplint/pbiplint.
|
|
52
78
|
|
|
53
79
|
## License
|
|
54
80
|
|
|
55
81
|
Copyright (C) 2026 McKinley Consulting. GNU Affero General Public License, version 3 or later; see
|
|
56
|
-
LICENSE. The vendored Microsoft ruleset
|
|
57
|
-
logo are trademarks of McKinley Consulting.
|
|
82
|
+
LICENSE. The vendored Microsoft ruleset and PBI Inspector rule metadata are MIT-licensed; see
|
|
83
|
+
NOTICE. The name pbiplint and its logo are trademarks of McKinley Consulting.
|