slopbrick 0.34.9 → 0.34.10
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/dist/engine/worker.cjs +7 -4
- package/dist/engine/worker.js +7 -4
- package/dist/index.cjs +8 -5
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/dist/engine/worker.cjs
CHANGED
|
@@ -40568,7 +40568,7 @@ var swiftFatalErrorThrownRule = createRule({
|
|
|
40568
40568
|
|
|
40569
40569
|
// src/rules/swift/force-unwrap.ts
|
|
40570
40570
|
var AS_FORCE_REGEX = /\bas!\s+/g;
|
|
40571
|
-
var ACCESS_FORCE_REGEX = /(
|
|
40571
|
+
var ACCESS_FORCE_REGEX = /(?<![=!])(\w|\])\!\s*(?:\.|\(|;|,|\s*$)/gm;
|
|
40572
40572
|
var TRY_FORCE_REGEX = /\btry!\s+/g;
|
|
40573
40573
|
var swiftForceUnwrapRule = createRule({
|
|
40574
40574
|
id: "swift/force-unwrap",
|
|
@@ -40595,7 +40595,7 @@ var swiftForceUnwrapRule = createRule({
|
|
|
40595
40595
|
message: `force-unwrap (${label}) at line ${line} \u2014 crashes if the value is nil`,
|
|
40596
40596
|
line,
|
|
40597
40597
|
column: 1,
|
|
40598
|
-
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.
|
|
40598
|
+
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.34.10 (refined: exclude `!` in `!==`/`!=` operators via negative lookbehind).'
|
|
40599
40599
|
});
|
|
40600
40600
|
};
|
|
40601
40601
|
let m;
|
|
@@ -40604,7 +40604,10 @@ var swiftForceUnwrapRule = createRule({
|
|
|
40604
40604
|
TRY_FORCE_REGEX.lastIndex = 0;
|
|
40605
40605
|
while ((m = TRY_FORCE_REGEX.exec(source)) !== null) emit(m.index, "try!");
|
|
40606
40606
|
ACCESS_FORCE_REGEX.lastIndex = 0;
|
|
40607
|
-
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null)
|
|
40607
|
+
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null) {
|
|
40608
|
+
const bangOffset = m.index + (m[1]?.length ?? 1);
|
|
40609
|
+
emit(bangOffset, "!.");
|
|
40610
|
+
}
|
|
40608
40611
|
return issues;
|
|
40609
40612
|
}
|
|
40610
40613
|
});
|
|
@@ -45714,7 +45717,7 @@ var signal_strength_default = {
|
|
|
45714
45717
|
precision: 0.1721,
|
|
45715
45718
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45716
45719
|
verdict: "DORMANT",
|
|
45717
|
-
_calibrationNote: "v0.
|
|
45720
|
+
_calibrationNote: "v0.34.10: REFINED \u2014 the access-force regex now uses a negative lookbehind to exclude `!` in `!=` and `!==` comparison operators. Per-file unique v9 Swift calibration (1300 neg, 568 pos): 58 TP files, 279 FP files, ratio=0.48 (DORMANT). The previous regex incorrectly fired on `!` in `a != b` and `a !== b` patterns, which are common in control flow. The refinement is expected to push precision from 17.2% to 25%+ by removing these false positives. Era-confounded: pre-2022 Swift used `!` freely (the only way to unwrap); modern Swift uses `guard let` / `if let` / `try?`. Same direction as kotlin/force-unwrap (0.35) and kotlin/runblocking-misuse (0.50). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
45718
45721
|
aiSpecific: true,
|
|
45719
45722
|
_v7Verdict: "DORMANT",
|
|
45720
45723
|
_v7Lift: 1,
|
package/dist/engine/worker.js
CHANGED
|
@@ -40539,7 +40539,7 @@ var swiftFatalErrorThrownRule = createRule({
|
|
|
40539
40539
|
|
|
40540
40540
|
// src/rules/swift/force-unwrap.ts
|
|
40541
40541
|
var AS_FORCE_REGEX = /\bas!\s+/g;
|
|
40542
|
-
var ACCESS_FORCE_REGEX = /(
|
|
40542
|
+
var ACCESS_FORCE_REGEX = /(?<![=!])(\w|\])\!\s*(?:\.|\(|;|,|\s*$)/gm;
|
|
40543
40543
|
var TRY_FORCE_REGEX = /\btry!\s+/g;
|
|
40544
40544
|
var swiftForceUnwrapRule = createRule({
|
|
40545
40545
|
id: "swift/force-unwrap",
|
|
@@ -40566,7 +40566,7 @@ var swiftForceUnwrapRule = createRule({
|
|
|
40566
40566
|
message: `force-unwrap (${label}) at line ${line} \u2014 crashes if the value is nil`,
|
|
40567
40567
|
line,
|
|
40568
40568
|
column: 1,
|
|
40569
|
-
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.
|
|
40569
|
+
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.34.10 (refined: exclude `!` in `!==`/`!=` operators via negative lookbehind).'
|
|
40570
40570
|
});
|
|
40571
40571
|
};
|
|
40572
40572
|
let m;
|
|
@@ -40575,7 +40575,10 @@ var swiftForceUnwrapRule = createRule({
|
|
|
40575
40575
|
TRY_FORCE_REGEX.lastIndex = 0;
|
|
40576
40576
|
while ((m = TRY_FORCE_REGEX.exec(source)) !== null) emit(m.index, "try!");
|
|
40577
40577
|
ACCESS_FORCE_REGEX.lastIndex = 0;
|
|
40578
|
-
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null)
|
|
40578
|
+
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null) {
|
|
40579
|
+
const bangOffset = m.index + (m[1]?.length ?? 1);
|
|
40580
|
+
emit(bangOffset, "!.");
|
|
40581
|
+
}
|
|
40579
40582
|
return issues;
|
|
40580
40583
|
}
|
|
40581
40584
|
});
|
|
@@ -45685,7 +45688,7 @@ var signal_strength_default = {
|
|
|
45685
45688
|
precision: 0.1721,
|
|
45686
45689
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45687
45690
|
verdict: "DORMANT",
|
|
45688
|
-
_calibrationNote: "v0.
|
|
45691
|
+
_calibrationNote: "v0.34.10: REFINED \u2014 the access-force regex now uses a negative lookbehind to exclude `!` in `!=` and `!==` comparison operators. Per-file unique v9 Swift calibration (1300 neg, 568 pos): 58 TP files, 279 FP files, ratio=0.48 (DORMANT). The previous regex incorrectly fired on `!` in `a != b` and `a !== b` patterns, which are common in control flow. The refinement is expected to push precision from 17.2% to 25%+ by removing these false positives. Era-confounded: pre-2022 Swift used `!` freely (the only way to unwrap); modern Swift uses `guard let` / `if let` / `try?`. Same direction as kotlin/force-unwrap (0.35) and kotlin/runblocking-misuse (0.50). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
45689
45692
|
aiSpecific: true,
|
|
45690
45693
|
_v7Verdict: "DORMANT",
|
|
45691
45694
|
_v7Lift: 1,
|
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var VERSION;
|
|
|
36
36
|
var init_header = __esm({
|
|
37
37
|
"src/types/_header.ts"() {
|
|
38
38
|
"use strict";
|
|
39
|
-
VERSION = "0.34.
|
|
39
|
+
VERSION = "0.34.10";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -41102,7 +41102,7 @@ var init_force_unwrap2 = __esm({
|
|
|
41102
41102
|
"use strict";
|
|
41103
41103
|
init_rule();
|
|
41104
41104
|
AS_FORCE_REGEX = /\bas!\s+/g;
|
|
41105
|
-
ACCESS_FORCE_REGEX = /(
|
|
41105
|
+
ACCESS_FORCE_REGEX = /(?<![=!])(\w|\])\!\s*(?:\.|\(|;|,|\s*$)/gm;
|
|
41106
41106
|
TRY_FORCE_REGEX = /\btry!\s+/g;
|
|
41107
41107
|
swiftForceUnwrapRule = createRule({
|
|
41108
41108
|
id: "swift/force-unwrap",
|
|
@@ -41129,7 +41129,7 @@ var init_force_unwrap2 = __esm({
|
|
|
41129
41129
|
message: `force-unwrap (${label}) at line ${line} \u2014 crashes if the value is nil`,
|
|
41130
41130
|
line,
|
|
41131
41131
|
column: 1,
|
|
41132
|
-
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.
|
|
41132
|
+
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.34.10 (refined: exclude `!` in `!==`/`!=` operators via negative lookbehind).'
|
|
41133
41133
|
});
|
|
41134
41134
|
};
|
|
41135
41135
|
let m;
|
|
@@ -41138,7 +41138,10 @@ var init_force_unwrap2 = __esm({
|
|
|
41138
41138
|
TRY_FORCE_REGEX.lastIndex = 0;
|
|
41139
41139
|
while ((m = TRY_FORCE_REGEX.exec(source)) !== null) emit(m.index, "try!");
|
|
41140
41140
|
ACCESS_FORCE_REGEX.lastIndex = 0;
|
|
41141
|
-
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null)
|
|
41141
|
+
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null) {
|
|
41142
|
+
const bangOffset = m.index + (m[1]?.length ?? 1);
|
|
41143
|
+
emit(bangOffset, "!.");
|
|
41144
|
+
}
|
|
41142
41145
|
return issues;
|
|
41143
41146
|
}
|
|
41144
41147
|
});
|
|
@@ -51801,7 +51804,7 @@ var init_signal_strength = __esm({
|
|
|
51801
51804
|
precision: 0.1721,
|
|
51802
51805
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51803
51806
|
verdict: "DORMANT",
|
|
51804
|
-
_calibrationNote: "v0.
|
|
51807
|
+
_calibrationNote: "v0.34.10: REFINED \u2014 the access-force regex now uses a negative lookbehind to exclude `!` in `!=` and `!==` comparison operators. Per-file unique v9 Swift calibration (1300 neg, 568 pos): 58 TP files, 279 FP files, ratio=0.48 (DORMANT). The previous regex incorrectly fired on `!` in `a != b` and `a !== b` patterns, which are common in control flow. The refinement is expected to push precision from 17.2% to 25%+ by removing these false positives. Era-confounded: pre-2022 Swift used `!` freely (the only way to unwrap); modern Swift uses `guard let` / `if let` / `try?`. Same direction as kotlin/force-unwrap (0.35) and kotlin/runblocking-misuse (0.50). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
51805
51808
|
aiSpecific: true,
|
|
51806
51809
|
_v7Verdict: "DORMANT",
|
|
51807
51810
|
_v7Lift: 1,
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var VERSION;
|
|
|
19
19
|
var init_header = __esm({
|
|
20
20
|
"src/types/_header.ts"() {
|
|
21
21
|
"use strict";
|
|
22
|
-
VERSION = "0.34.
|
|
22
|
+
VERSION = "0.34.10";
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -41083,7 +41083,7 @@ var init_force_unwrap2 = __esm({
|
|
|
41083
41083
|
"use strict";
|
|
41084
41084
|
init_rule();
|
|
41085
41085
|
AS_FORCE_REGEX = /\bas!\s+/g;
|
|
41086
|
-
ACCESS_FORCE_REGEX = /(
|
|
41086
|
+
ACCESS_FORCE_REGEX = /(?<![=!])(\w|\])\!\s*(?:\.|\(|;|,|\s*$)/gm;
|
|
41087
41087
|
TRY_FORCE_REGEX = /\btry!\s+/g;
|
|
41088
41088
|
swiftForceUnwrapRule = createRule({
|
|
41089
41089
|
id: "swift/force-unwrap",
|
|
@@ -41110,7 +41110,7 @@ var init_force_unwrap2 = __esm({
|
|
|
41110
41110
|
message: `force-unwrap (${label}) at line ${line} \u2014 crashes if the value is nil`,
|
|
41111
41111
|
line,
|
|
41112
41112
|
column: 1,
|
|
41113
|
-
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.
|
|
41113
|
+
advice: 'Replace with the safe form: `as?` + guard/if let, `try?` + nil-check, or `guard let x = optional else { return }` instead of `x!`. A force-unwrap converts "the value might be nil" into "the program crashes if the value is nil" \u2014 in production that is a customer-facing crash log. AI agents reach for `!` because their training-data snippets "just make it compile" without modelling the nil case. Apple SwiftLint flags every shape (force_cast / force_try / force_unwrapping). Reference: swift/force-unwrap v0.34.10 (refined: exclude `!` in `!==`/`!=` operators via negative lookbehind).'
|
|
41114
41114
|
});
|
|
41115
41115
|
};
|
|
41116
41116
|
let m;
|
|
@@ -41119,7 +41119,10 @@ var init_force_unwrap2 = __esm({
|
|
|
41119
41119
|
TRY_FORCE_REGEX.lastIndex = 0;
|
|
41120
41120
|
while ((m = TRY_FORCE_REGEX.exec(source)) !== null) emit(m.index, "try!");
|
|
41121
41121
|
ACCESS_FORCE_REGEX.lastIndex = 0;
|
|
41122
|
-
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null)
|
|
41122
|
+
while ((m = ACCESS_FORCE_REGEX.exec(source)) !== null) {
|
|
41123
|
+
const bangOffset = m.index + (m[1]?.length ?? 1);
|
|
41124
|
+
emit(bangOffset, "!.");
|
|
41125
|
+
}
|
|
41123
41126
|
return issues;
|
|
41124
41127
|
}
|
|
41125
41128
|
});
|
|
@@ -51779,7 +51782,7 @@ var init_signal_strength = __esm({
|
|
|
51779
51782
|
precision: 0.1721,
|
|
51780
51783
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51781
51784
|
verdict: "DORMANT",
|
|
51782
|
-
_calibrationNote: "v0.
|
|
51785
|
+
_calibrationNote: "v0.34.10: REFINED \u2014 the access-force regex now uses a negative lookbehind to exclude `!` in `!=` and `!==` comparison operators. Per-file unique v9 Swift calibration (1300 neg, 568 pos): 58 TP files, 279 FP files, ratio=0.48 (DORMANT). The previous regex incorrectly fired on `!` in `a != b` and `a !== b` patterns, which are common in control flow. The refinement is expected to push precision from 17.2% to 25%+ by removing these false positives. Era-confounded: pre-2022 Swift used `!` freely (the only way to unwrap); modern Swift uses `guard let` / `if let` / `try?`. Same direction as kotlin/force-unwrap (0.35) and kotlin/runblocking-misuse (0.50). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
51783
51786
|
aiSpecific: true,
|
|
51784
51787
|
_v7Verdict: "DORMANT",
|
|
51785
51788
|
_v7Lift: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slopbrick",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.10",
|
|
4
4
|
"description": "Discovered, modeled, and governed repository structure. SlopBrick scans source code, classifies it against 95+ rules in 15 categories, computes 4 scores (aiSlopScore: lower=cleaner, engineeringHygiene, security, repositoryHealth composite), and persists the structure for AI agents and CI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|