@fabriziosalmi/slopless 1.13.0 → 1.14.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/README.md +28 -28
- package/dist/engine/api.js +122 -122
- package/dist/index.d.ts +1 -0
- package/dist/index.js +167 -167
- package/package.json +1 -1
- package/rules/VBC-949.yaml +29 -0
- package/rules/VBC-950.yaml +41 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Slopless is a static analysis tool designed to identify and mitigate unstructure
|
|
|
6
6
|
|
|
7
7
|
## Architecture and Capabilities
|
|
8
8
|
|
|
9
|
-
- **Rule Engine**:
|
|
9
|
+
- **Rule Engine**: 152 rigorous rules spanning security, maintainability, accessibility, and documentation integrity. Every rule ships executable examples — a snippet it must flag and one it must leave alone — run on every commit.
|
|
10
10
|
- **AST Inspection**: Deep structural validation to identify excessive cyclomatic complexity, parameter limits, and empty control flow blocks.
|
|
11
11
|
- **Deep Semantic Validation**: Opt-in TypeScript TypeChecker (`--type-check`) for resolving inherited types, identifying floating promises, and validating structural intent beyond AST boundaries.
|
|
12
12
|
- **Heuristic Auto-Fixes**: Autonomous modification of known anti-patterns (e.g., `var` to `let`) using `--fix`.
|
|
@@ -123,32 +123,32 @@ count, written from the rules rather than from memory:
|
|
|
123
123
|
<!-- coverage:start -->
|
|
124
124
|
| language | rules |
|
|
125
125
|
| --- | --- |
|
|
126
|
-
| TypeScript (JSX) (`.tsx`) |
|
|
127
|
-
| TypeScript (`.ts`) |
|
|
128
|
-
| JavaScript (`.js`) |
|
|
129
|
-
| Astro (`.astro`) |
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
| Markdown (`.md`) | 26 of
|
|
133
|
-
| CSS (`.css`) | 23 of
|
|
134
|
-
| HTML (`.html`) | 21 of
|
|
135
|
-
| Go (`.go`) | 19 of
|
|
136
|
-
| Plain text (`.txt`) | 18 of
|
|
137
|
-
| Shell (`.sh`) | 16 of
|
|
138
|
-
| Java (`.java`) | 15 of
|
|
139
|
-
| Rust (`.rs`) | 15 of
|
|
140
|
-
| Sass (SCSS) (`.scss`) | 15 of
|
|
141
|
-
| Ruby (`.rb`) | 14 of
|
|
142
|
-
| C# (`.cs`) | 13 of
|
|
143
|
-
| C (`.c`) | 12 of
|
|
144
|
-
| C++ (`.cpp`) | 12 of
|
|
145
|
-
| Kotlin (`.kt`) | 12 of
|
|
146
|
-
| Swift (`.swift`) | 12 of
|
|
147
|
-
| Less (`.less`) | 9 of
|
|
148
|
-
| JSON (`.json`) | 5 of
|
|
149
|
-
| PHP (`.php`) | 5 of
|
|
150
|
-
| Dotenv (`.env`) | 4 of
|
|
151
|
-
| YAML (`.yaml`) | 3 of
|
|
126
|
+
| TypeScript (JSX) (`.tsx`) | 98 of 152 |
|
|
127
|
+
| TypeScript (`.ts`) | 96 of 152 |
|
|
128
|
+
| JavaScript (`.js`) | 95 of 152 |
|
|
129
|
+
| Astro (`.astro`) | 84 of 152 |
|
|
130
|
+
| JavaScript (JSX) (`.jsx`) | 32 of 152 |
|
|
131
|
+
| Python (`.py`) | 32 of 152 |
|
|
132
|
+
| Markdown (`.md`) | 26 of 152 |
|
|
133
|
+
| CSS (`.css`) | 23 of 152 |
|
|
134
|
+
| HTML (`.html`) | 21 of 152 |
|
|
135
|
+
| Go (`.go`) | 19 of 152 |
|
|
136
|
+
| Plain text (`.txt`) | 18 of 152 |
|
|
137
|
+
| Shell (`.sh`) | 16 of 152 |
|
|
138
|
+
| Java (`.java`) | 15 of 152 |
|
|
139
|
+
| Rust (`.rs`) | 15 of 152 |
|
|
140
|
+
| Sass (SCSS) (`.scss`) | 15 of 152 |
|
|
141
|
+
| Ruby (`.rb`) | 14 of 152 |
|
|
142
|
+
| C# (`.cs`) | 13 of 152 |
|
|
143
|
+
| C (`.c`) | 12 of 152 |
|
|
144
|
+
| C++ (`.cpp`) | 12 of 152 |
|
|
145
|
+
| Kotlin (`.kt`) | 12 of 152 |
|
|
146
|
+
| Swift (`.swift`) | 12 of 152 |
|
|
147
|
+
| Less (`.less`) | 9 of 152 |
|
|
148
|
+
| JSON (`.json`) | 5 of 152 |
|
|
149
|
+
| PHP (`.php`) | 5 of 152 |
|
|
150
|
+
| Dotenv (`.env`) | 4 of 152 |
|
|
151
|
+
| YAML (`.yaml`) | 3 of 152 |
|
|
152
152
|
<!-- coverage:end -->
|
|
153
153
|
|
|
154
154
|
The parsing tiers use the TypeScript compiler, so the AST, semantic-naming and
|
|
@@ -169,7 +169,7 @@ None of them has an opinion about a section that says "coming soon".
|
|
|
169
169
|
- **Documentation**: Detection of generated filler content, non-inclusive language, and broken external references.
|
|
170
170
|
|
|
171
171
|
Full documentation at [fabriziosalmi.github.io/slopless](https://fabriziosalmi.github.io/slopless/):
|
|
172
|
-
[all
|
|
172
|
+
[all 152 rules](https://fabriziosalmi.github.io/slopless/rules/) ·
|
|
173
173
|
[configuration](https://fabriziosalmi.github.io/slopless/configuration) ·
|
|
174
174
|
[writing a rule](https://fabriziosalmi.github.io/slopless/writing-a-rule) ·
|
|
175
175
|
[the scanner bug story](https://fabriziosalmi.github.io/slopless/story)
|