pbiplint 0.1.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 ADDED
@@ -0,0 +1,29 @@
1
+ pbiplint itself is licensed under the GNU Affero General Public License,
2
+ version 3 or later; see LICENSE. The MIT license text below applies only
3
+ to the third-party material described here, not to pbiplint.
4
+
5
+ pbiplint bundles rule definitions derived from BPARules.json in the
6
+ microsoft/Analysis-Services repository (https://github.com/microsoft/Analysis-Services),
7
+ which is licensed under the MIT License:
8
+
9
+ MIT License
10
+
11
+ Copyright (c) Microsoft Corporation. All rights reserved.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # pbiplint
2
+
3
+ Best-practice linter for Power BI semantic models. Point it at a `.SemanticModel` folder, a PBIP
4
+ folder, or one `.tmdl` file and get ranked findings with a link to a fix page for each rule.
5
+ Nothing is uploaded: it reads the files you name and writes to your terminal. Node 20 or later.
6
+
7
+ ```bash
8
+ npx pbiplint path/to/Model.SemanticModel
9
+ npx pbiplint --sample # a bundled model with planted violations
10
+ npx pbiplint path/to/model --format sarif --output pbiplint.sarif
11
+ npx pbiplint path/to/model --format markdown
12
+ npx pbiplint rules # every rule with status and severity
13
+ ```
14
+
15
+ Formats: `text` (default), `json`, `sarif` (for GitHub code scanning and editors), `markdown`.
16
+
17
+ Exit codes: `0` no findings at or above `--fail-on` (default `error`), `1` findings, `2` usage or
18
+ input error. `--fail-on warning` tightens the gate; `--fail-on none` always exits 0.
19
+
20
+ ## Configuration
21
+
22
+ `pbiplint.config.json` next to the project, or anywhere above it (the nearest one wins; `--config`
23
+ picks one explicitly):
24
+
25
+ ```json
26
+ {
27
+ "$schema": "https://pbiplint.com/schema/pbiplint.config.schema.json",
28
+ "rules": {
29
+ "REMOVE_ROLES_WITH_NO_MEMBERS": "off",
30
+ "DAX_COLUMNS_FULLY_QUALIFIED": "warning"
31
+ },
32
+ "failOn": "warning"
33
+ }
34
+ ```
35
+
36
+ To ignore a rule on one object, annotate it in TMDL (Power BI Desktop keeps the annotation):
37
+
38
+ ```
39
+ column 'Product ID'
40
+ dataType: int64
41
+ annotation pbiplint.ignore = HIDE_FOREIGN_KEYS, MARK_PRIMARY_KEYS
42
+ ```
43
+
44
+ ## What it checks
45
+
46
+ Every rule from the Microsoft Best Practice Analyzer ruleset, ported literally so the numbers match
47
+ Tabular Editor. Five rules need statistics only a live model has; they are listed but not run. Each
48
+ rule has a page at https://pbiplint.com/rules with what it checks, why, how to fix it, and quirks.
49
+
50
+ The same linter runs in the browser at https://pbiplint.com. Source, issues, and contributing:
51
+ https://github.com/pbiplint/pbiplint.
52
+
53
+ ## License
54
+
55
+ Copyright (C) 2026 McKinley Consulting. GNU Affero General Public License, version 3 or later; see
56
+ LICENSE. The vendored Microsoft ruleset is MIT-licensed; see NOTICE. The name pbiplint and its
57
+ logo are trademarks of McKinley Consulting.