pumuki 6.3.162 → 6.3.163

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.
@@ -669,6 +669,26 @@ final class LoginModelTests: XCTestCase {
669
669
  assert.equal(hasSwiftModernizableXCTestSuiteUsage(missingQualityContract), false);
670
670
  });
671
671
 
672
+ test('detectores Swift Testing excluyen helpers y factories XCTest brownfield sin XCTestCase', () => {
673
+ const helperSource = `
674
+ import XCTest
675
+
676
+ final class AuthTestFactories {
677
+ static func makeToken() -> String {
678
+ "token"
679
+ }
680
+ }
681
+
682
+ func trackForMemoryLeaks(_ instance: AnyObject, file: StaticString = #filePath, line: UInt = #line) {
683
+ addTeardownBlock { _ = instance }
684
+ }
685
+ `;
686
+
687
+ assert.equal(hasSwiftLegacyXCTestImportUsage(helperSource), false);
688
+ assert.equal(hasSwiftModernizableXCTestSuiteUsage(helperSource), false);
689
+ assert.equal(hasSwiftXCTestAssertionUsage(helperSource), false);
690
+ });
691
+
672
692
  test('hasSwiftXCTUnwrapUsage detecta XCTUnwrap real y evita strings', () => {
673
693
  const source = `
674
694
  let value = try XCTUnwrap(optionalValue)
@@ -845,6 +845,10 @@ export const hasSwiftLegacyXCTestImportUsage = (source: string): boolean => {
845
845
  return false;
846
846
  }
847
847
 
848
+ if (!hasSwiftXCTestCaseSubclassUsage(source) || !hasSwiftLegacyXCTestMethodUsage(source)) {
849
+ return false;
850
+ }
851
+
848
852
  if (hasSwiftLegacyXCTestUiOrPerformanceUsage(source)) {
849
853
  return false;
850
854
  }
@@ -655,6 +655,13 @@ const isXCTestSource = (content: string): boolean => {
655
655
  return /\bimport\s+XCTest\b/.test(content) || /\bXCTestCase\b/.test(content);
656
656
  };
657
657
 
658
+ const isXCTestSuiteSource = (content: string): boolean => {
659
+ return (
660
+ /\bclass\s+[A-Za-z_][A-Za-z0-9_]*\s*:\s*XCTestCase\b/.test(content) &&
661
+ /^\s*(?:override\s+)?func\s+test[A-Za-z0-9_]*\s*\(/m.test(content)
662
+ );
663
+ };
664
+
658
665
  const isXCTestUiOrPerformanceCompatibilitySource = (content: string): boolean => {
659
666
  return /\bXCUIApplication\b|\bXCTMetric\b|\bmeasure\s*(?:\(|\{)/.test(content);
660
667
  };
@@ -678,6 +685,9 @@ const toIosTestsQualityBlockingFinding = (params: {
678
685
  if (!isXCTestSource(testFile.content)) {
679
686
  continue;
680
687
  }
688
+ if (!isXCTestSuiteSource(testFile.content)) {
689
+ continue;
690
+ }
681
691
  if (isXCTestUiOrPerformanceCompatibilitySource(testFile.content)) {
682
692
  continue;
683
693
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.162",
3
+ "version": "6.3.163",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {