pbiplint 0.1.2 → 0.2.1

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.
Files changed (102) hide show
  1. package/NOTICE +27 -0
  2. package/README.md +35 -10
  3. package/dist/pbiplint.mjs +13680 -2838
  4. package/package.json +5 -3
  5. package/sample/Messy Sales Demo.Report/.platform +11 -0
  6. package/sample/Messy Sales Demo.Report/definition/bookmarks/bookmarks.json +8 -0
  7. package/sample/Messy Sales Demo.Report/definition/bookmarks/f56cd9f5f68d30c0e4e3.bookmark.json +41 -0
  8. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/page.json +8 -0
  9. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3130cf9463309528054d/visual.json +185 -0
  10. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3e7724efa859ff7b9701/visual.json +130 -0
  11. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/3fe8e6907656325b8e86/visual.json +187 -0
  12. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/51bb4f6f5f7f71ed0a3c/visual.json +69 -0
  13. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/d2995ea3e9b9d9244bf6/visual.json +31 -0
  14. package/sample/Messy Sales Demo.Report/definition/pages/00e055aa522743f28a39/visuals/d307b6575ca81d163aac/visual.json +186 -0
  15. package/sample/Messy Sales Demo.Report/definition/pages/27f668864829019f9251/page.json +8 -0
  16. package/sample/Messy Sales Demo.Report/definition/pages/27f668864829019f9251/visuals/1e7f28bf49e435b68c50/visual.json +156 -0
  17. package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/page.json +8 -0
  18. package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/6c96585893b6f603b9ac/visual.json +185 -0
  19. package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/6e99982d842b0d962e16/visual.json +189 -0
  20. package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/8081f5bb7075e7b008bc/visual.json +185 -0
  21. package/sample/Messy Sales Demo.Report/definition/pages/3485dcffc49d1608c370/visuals/c5147d97ff0b18a24336/visual.json +185 -0
  22. package/sample/Messy Sales Demo.Report/definition/pages/3b33a1ae720bb93d48b9/page.json +48 -0
  23. package/sample/Messy Sales Demo.Report/definition/pages/3b33a1ae720bb93d48b9/visuals/e32acaa3eb3e6dd81dca/visual.json +195 -0
  24. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/page.json +8 -0
  25. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/23f7a6962538ec0c0ff4/visual.json +155 -0
  26. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/2b5386e9de3e1fbb1afa/visual.json +147 -0
  27. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/307e834045a168e7a394/visual.json +305 -0
  28. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/4457e97e02f61c8f609b/visual.json +176 -0
  29. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/49158e1e7dce5e8d37fd/visual.json +68 -0
  30. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/6500e9c3f9d74f2958c7/visual.json +312 -0
  31. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/6edcdc464f4016c0264c/visual.json +185 -0
  32. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/88530bc0f64114317e2e/visual.json +155 -0
  33. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/a75a96eee1fd0cf4cef7/visual.json +185 -0
  34. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/bda61916a7b1efdee3fe/visual.json +145 -0
  35. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/d93ac3d110ff0a347497/visual.json +185 -0
  36. package/sample/Messy Sales Demo.Report/definition/pages/3cea48e58036b1654474/visuals/db47426e580241dac6b8/visual.json +104 -0
  37. package/sample/Messy Sales Demo.Report/definition/pages/52db6f0b218c638f8761/page.json +8 -0
  38. package/sample/Messy Sales Demo.Report/definition/pages/52db6f0b218c638f8761/visuals/8edac00805f721edc1c1/visual.json +196 -0
  39. package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/page.json +8 -0
  40. package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/598cfda00746e83f4896/visual.json +162 -0
  41. package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/6c71af13bcdb4c28cce8/visual.json +133 -0
  42. package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/8aa02d4e168b39268df4/visual.json +185 -0
  43. package/sample/Messy Sales Demo.Report/definition/pages/5fbcb07dde4e4fada3f6/visuals/ab6166569dd355894dc2/visual.json +192 -0
  44. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/page.json +8 -0
  45. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/05d453611bc204914797/visual.json +291 -0
  46. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/0dcfd84094ee2cfe485b/visual.json +185 -0
  47. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/11146719bd576271e11a/visual.json +238 -0
  48. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/338338c16a0d509bdaf5/visual.json +238 -0
  49. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/3ee96306fb282e5dfe38/visual.json +185 -0
  50. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/404c49f853ea8dde3b6c/visual.json +238 -0
  51. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/55ddee811456e2b049cf/visual.json +291 -0
  52. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/5bf9a67d54ba75bb7be1/visual.json +185 -0
  53. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/63f71d3b642fb6c8a9ba/visual.json +291 -0
  54. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/80873270a475b81ef0fb/visual.json +185 -0
  55. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/838ab6226a66fdfb13dc/visual.json +238 -0
  56. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/9b12811305cdd50a97c4/visual.json +185 -0
  57. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/a1a8f953ebef2d733956/visual.json +291 -0
  58. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/b7e7f7c15ff9284e72d3/visual.json +291 -0
  59. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/b9229ce2b277de70e402/visual.json +185 -0
  60. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/cf88d237300a7d6a6709/visual.json +185 -0
  61. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/d66ccf48cfa017d01124/visual.json +185 -0
  62. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/d8ab941db2b7bd34c19e/visual.json +238 -0
  63. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/daadba18a786c3e25d97/visual.json +185 -0
  64. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/e1552553ac4f0856010e/visual.json +185 -0
  65. package/sample/Messy Sales Demo.Report/definition/pages/9f2ae77d3572304756ae/visuals/f108285d5ebc6bcdba77/visual.json +185 -0
  66. package/sample/Messy Sales Demo.Report/definition/pages/b52832c4d9f487868953/page.json +9 -0
  67. package/sample/Messy Sales Demo.Report/definition/pages/b52832c4d9f487868953/visuals/2a7e16428070011e60ec/visual.json +55 -0
  68. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/page.json +8 -0
  69. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/3fa0fc35d2dd20b9b1f2/visual.json +186 -0
  70. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/55b04f4555a4615ecd32/visual.json +185 -0
  71. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/94c00b0b84a51b0e0b39/visual.json +140 -0
  72. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/acc24e8136085a985f3f/visual.json +32 -0
  73. package/sample/Messy Sales Demo.Report/definition/pages/bb1ea3ba2a1defa1979b/visuals/de6a17691cc952e6d7dd/visual.json +120 -0
  74. package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/page.json +8 -0
  75. package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/visuals/27e669b1ee2de2c3ac9d/visual.json +96 -0
  76. package/sample/Messy Sales Demo.Report/definition/pages/fa72b934a72314dcf1b1/visuals/b230f06615cf87ee455f/visual.json +185 -0
  77. package/sample/Messy Sales Demo.Report/definition/pages/pages.json +17 -0
  78. package/sample/Messy Sales Demo.Report/definition/report.json +66 -0
  79. package/sample/Messy Sales Demo.Report/definition/reportExtensions.json +46 -0
  80. package/sample/Messy Sales Demo.Report/definition/version.json +4 -0
  81. package/sample/Messy Sales Demo.Report/definition.pbir +9 -0
  82. package/sample/{.platform → Messy Sales Demo.SemanticModel/.platform } +1 -1
  83. package/sample/Messy Sales Demo.SemanticModel/definition/cultures/en-US.tmdl +32 -0
  84. package/sample/Messy Sales Demo.SemanticModel/definition/database.tmdl +3 -0
  85. package/sample/{definition/model.tmdl → Messy Sales Demo.SemanticModel/definition/model.tmdl } +3 -0
  86. package/sample/{definition/relationships.tmdl → Messy Sales Demo.SemanticModel/definition/relationships.tmdl } +6 -0
  87. package/sample/{definition/tables/Customer.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Customer.tmdl } +5 -0
  88. package/sample/Messy Sales Demo.SemanticModel/definition/tables/DateTableTemplate_96ead6f8-eef3-4336-a020-6641aa278e92.tmdl +118 -0
  89. package/sample/Messy Sales Demo.SemanticModel/definition/tables/Employee Grouping.tmdl +49 -0
  90. package/sample/Messy Sales Demo.SemanticModel/definition/tables/LocalDateTable_b6c07c62-ecbc-4f14-b072-2fb027697b1d.tmdl +116 -0
  91. package/sample/{definition/tables/Sales.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Sales.tmdl } +42 -42
  92. package/sample/{definition/tables/Store.tmdl → Messy Sales Demo.SemanticModel/definition/tables/Store.tmdl } +15 -0
  93. package/sample/Messy Sales Demo.pbip +14 -0
  94. package/sample/pbiplint.config.json +7 -0
  95. package/sample/.pbi/editorSettings.json +0 -8
  96. package/sample/definition/cultures/en-US.tmdl +0 -2
  97. package/sample/definition/database.tmdl +0 -3
  98. /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Date.tmdl +0 -0
  99. /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Employee.tmdl +0 -0
  100. /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Product.tmdl +0 -0
  101. /package/sample/{definition → Messy Sales Demo.SemanticModel/definition}/tables/Promotion.tmdl +0 -0
  102. /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,13 +1,15 @@
1
1
  # pbiplint
2
2
 
3
- Best-practice linter for Power BI semantic models. Point it at a `.SemanticModel` folder, a PBIP
4
- folder, a `definition` folder, or one `.tmdl` file and get ranked findings with a link to a fix
5
- page for each rule. Nothing is uploaded: it reads the files you name and writes to your terminal.
6
- Node 20 or later.
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).
7
9
 
8
10
  ```bash
9
11
  npx pbiplint path/to/Model.SemanticModel
10
- npx pbiplint --sample # a bundled model with planted violations
12
+ npx pbiplint --sample # a bundled project, a model and its report, with planted violations
11
13
  npx pbiplint path/to/model --format sarif --output pbiplint.sarif
12
14
  npx pbiplint path/to/model --format markdown
13
15
  npx pbiplint rules # every rule with status and severity
@@ -37,6 +39,9 @@ picks one explicitly):
37
39
  }
38
40
  ```
39
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
+
40
45
  To ignore a rule on one object, annotate it in TMDL (Power BI Desktop keeps the annotation):
41
46
 
42
47
  ```
@@ -45,11 +50,31 @@ To ignore a rule on one object, annotate it in TMDL (Power BI Desktop keeps the
45
50
  annotation pbiplint.ignore = HIDE_FOREIGN_KEYS, MARK_PRIMARY_KEYS
46
51
  ```
47
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
+
48
60
  ## What it checks
49
61
 
50
- Every rule from the Microsoft Best Practice Analyzer ruleset, ported literally so the numbers match
51
- Tabular Editor. Five rules need statistics only a live model has; they are listed but not run. Each
52
- rule has a page at https://pbiplint.com/rules with what it checks, why, how to fix it, and quirks.
62
+ Every rule from the Microsoft Best Practice Analyzer ruleset, ported so the results match Tabular
63
+ Editor on the same model, with five documented deviations where the source is noisier, or quieter,
64
+ than it means to be; and pbiplint's own rule 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. Five of the Microsoft rules need statistics only
66
+ a live model has; they are listed but not run. Each rule has a page at https://pbiplint.com/rules
67
+ with what it checks, why, how to fix it, and quirks.
68
+
69
+ The report layer (PBIR) is read beside the model: a `.Report` folder alone is valid input, and with
70
+ the model beside it the two are paired through `definition.pbir` and checked together. The report
71
+ rules are the 11 base rules of PBI Inspector by Nat Van Gulck, ported so the results match its
72
+ command line on the same report, with six documented deviations, and pbiplint's own rules for a
73
+ report's correctness and readiness and for the model objects the report never reaches. When the
74
+ input has a report, the "Report at a glance" block states what the report will do when someone
75
+ opens it, whether or not anything fired. A notice names anything about the input a reader must
76
+ know, such as a file that could not be read or a `definition.pbir` that points at a model other
77
+ than the one beside it.
53
78
 
54
79
  The same linter runs in the browser at https://pbiplint.com. Source, issues, and contributing:
55
80
  https://github.com/pbiplint/pbiplint.
@@ -57,5 +82,5 @@ https://github.com/pbiplint/pbiplint.
57
82
  ## License
58
83
 
59
84
  Copyright (C) 2026 McKinley Consulting. GNU Affero General Public License, version 3 or later; see
60
- LICENSE. The vendored Microsoft ruleset is MIT-licensed; see NOTICE. The name pbiplint and its
61
- logo are trademarks of McKinley Consulting.
85
+ LICENSE. The vendored Microsoft ruleset and PBI Inspector rule metadata are MIT-licensed; see
86
+ NOTICE. The name pbiplint and its logo are trademarks of McKinley Consulting.