codeslick-cli 1.0.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 +458 -0
- package/__tests__/cli-reporter.test.ts +86 -0
- package/__tests__/config-loader.test.ts +247 -0
- package/__tests__/local-scanner.test.ts +245 -0
- package/bin/codeslick.cjs +153 -0
- package/dist/packages/cli/src/commands/auth.d.ts +36 -0
- package/dist/packages/cli/src/commands/auth.d.ts.map +1 -0
- package/dist/packages/cli/src/commands/auth.js +226 -0
- package/dist/packages/cli/src/commands/auth.js.map +1 -0
- package/dist/packages/cli/src/commands/config.d.ts +37 -0
- package/dist/packages/cli/src/commands/config.d.ts.map +1 -0
- package/dist/packages/cli/src/commands/config.js +196 -0
- package/dist/packages/cli/src/commands/config.js.map +1 -0
- package/dist/packages/cli/src/commands/init.d.ts +32 -0
- package/dist/packages/cli/src/commands/init.d.ts.map +1 -0
- package/dist/packages/cli/src/commands/init.js +171 -0
- package/dist/packages/cli/src/commands/init.js.map +1 -0
- package/dist/packages/cli/src/commands/scan.d.ts +40 -0
- package/dist/packages/cli/src/commands/scan.d.ts.map +1 -0
- package/dist/packages/cli/src/commands/scan.js +204 -0
- package/dist/packages/cli/src/commands/scan.js.map +1 -0
- package/dist/packages/cli/src/config/config-loader.d.ts +67 -0
- package/dist/packages/cli/src/config/config-loader.d.ts.map +1 -0
- package/dist/packages/cli/src/config/config-loader.js +146 -0
- package/dist/packages/cli/src/config/config-loader.js.map +1 -0
- package/dist/packages/cli/src/reporters/cli-reporter.d.ts +69 -0
- package/dist/packages/cli/src/reporters/cli-reporter.d.ts.map +1 -0
- package/dist/packages/cli/src/reporters/cli-reporter.js +244 -0
- package/dist/packages/cli/src/reporters/cli-reporter.js.map +1 -0
- package/dist/packages/cli/src/scanner/local-scanner.d.ts +92 -0
- package/dist/packages/cli/src/scanner/local-scanner.d.ts.map +1 -0
- package/dist/packages/cli/src/scanner/local-scanner.js +221 -0
- package/dist/packages/cli/src/scanner/local-scanner.js.map +1 -0
- package/dist/src/lib/analyzers/helpers/ai-code-detection-utils.d.ts +88 -0
- package/dist/src/lib/analyzers/helpers/ai-code-detection-utils.d.ts.map +1 -0
- package/dist/src/lib/analyzers/helpers/ai-code-detection-utils.js +371 -0
- package/dist/src/lib/analyzers/helpers/ai-code-detection-utils.js.map +1 -0
- package/dist/src/lib/analyzers/helpers/jsx-helpers.d.ts +63 -0
- package/dist/src/lib/analyzers/helpers/jsx-helpers.d.ts.map +1 -0
- package/dist/src/lib/analyzers/helpers/jsx-helpers.js +95 -0
- package/dist/src/lib/analyzers/helpers/jsx-helpers.js.map +1 -0
- package/dist/src/lib/analyzers/helpers/variable-tracker.d.ts +59 -0
- package/dist/src/lib/analyzers/helpers/variable-tracker.d.ts.map +1 -0
- package/dist/src/lib/analyzers/helpers/variable-tracker.js +231 -0
- package/dist/src/lib/analyzers/helpers/variable-tracker.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/access-control.d.ts +20 -0
- package/dist/src/lib/analyzers/java/security-checks/access-control.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/access-control.js +129 -0
- package/dist/src/lib/analyzers/java/security-checks/access-control.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/ai-generated-code.d.ts +25 -0
- package/dist/src/lib/analyzers/java/security-checks/ai-generated-code.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/ai-generated-code.js +221 -0
- package/dist/src/lib/analyzers/java/security-checks/ai-generated-code.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/code-quality.d.ts +18 -0
- package/dist/src/lib/analyzers/java/security-checks/code-quality.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/code-quality.js +84 -0
- package/dist/src/lib/analyzers/java/security-checks/code-quality.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/crypto-validation.d.ts +18 -0
- package/dist/src/lib/analyzers/java/security-checks/crypto-validation.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/crypto-validation.js +161 -0
- package/dist/src/lib/analyzers/java/security-checks/crypto-validation.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/deserialization-xxe.d.ts +20 -0
- package/dist/src/lib/analyzers/java/security-checks/deserialization-xxe.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/deserialization-xxe.js +163 -0
- package/dist/src/lib/analyzers/java/security-checks/deserialization-xxe.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/enhanced-supply-chain.d.ts +24 -0
- package/dist/src/lib/analyzers/java/security-checks/enhanced-supply-chain.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/enhanced-supply-chain.js +178 -0
- package/dist/src/lib/analyzers/java/security-checks/enhanced-supply-chain.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/exception-handling.d.ts +25 -0
- package/dist/src/lib/analyzers/java/security-checks/exception-handling.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/exception-handling.js +179 -0
- package/dist/src/lib/analyzers/java/security-checks/exception-handling.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/file-operations.d.ts +17 -0
- package/dist/src/lib/analyzers/java/security-checks/file-operations.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/file-operations.js +67 -0
- package/dist/src/lib/analyzers/java/security-checks/file-operations.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/framework-security.d.ts +25 -0
- package/dist/src/lib/analyzers/java/security-checks/framework-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/framework-security.js +396 -0
- package/dist/src/lib/analyzers/java/security-checks/framework-security.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/hardcoded-credentials.d.ts +20 -0
- package/dist/src/lib/analyzers/java/security-checks/hardcoded-credentials.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/hardcoded-credentials.js +123 -0
- package/dist/src/lib/analyzers/java/security-checks/hardcoded-credentials.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/injection-attacks.d.ts +23 -0
- package/dist/src/lib/analyzers/java/security-checks/injection-attacks.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/injection-attacks.js +201 -0
- package/dist/src/lib/analyzers/java/security-checks/injection-attacks.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/insecure-design.d.ts +20 -0
- package/dist/src/lib/analyzers/java/security-checks/insecure-design.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/insecure-design.js +121 -0
- package/dist/src/lib/analyzers/java/security-checks/insecure-design.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/logging-failures.d.ts +20 -0
- package/dist/src/lib/analyzers/java/security-checks/logging-failures.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/logging-failures.js +89 -0
- package/dist/src/lib/analyzers/java/security-checks/logging-failures.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/security-misconfiguration.d.ts +26 -0
- package/dist/src/lib/analyzers/java/security-checks/security-misconfiguration.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/security-misconfiguration.js +309 -0
- package/dist/src/lib/analyzers/java/security-checks/security-misconfiguration.js.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/unsafe-patterns.d.ts +18 -0
- package/dist/src/lib/analyzers/java/security-checks/unsafe-patterns.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/security-checks/unsafe-patterns.js +114 -0
- package/dist/src/lib/analyzers/java/security-checks/unsafe-patterns.js.map +1 -0
- package/dist/src/lib/analyzers/java/utils/createVulnerability.d.ts +58 -0
- package/dist/src/lib/analyzers/java/utils/createVulnerability.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java/utils/createVulnerability.js +71 -0
- package/dist/src/lib/analyzers/java/utils/createVulnerability.js.map +1 -0
- package/dist/src/lib/analyzers/java-analyzer.d.ts +209 -0
- package/dist/src/lib/analyzers/java-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/java-analyzer.js +1720 -0
- package/dist/src/lib/analyzers/java-analyzer.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/ai-hallucinations.d.ts +27 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/ai-hallucinations.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/ai-hallucinations.js +123 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/ai-hallucinations.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/async-patterns.d.ts +44 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/async-patterns.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/async-patterns.js +224 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/async-patterns.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/code-patterns.d.ts +50 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/code-patterns.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/code-patterns.js +284 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/code-patterns.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/comparison-issues.d.ts +27 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/comparison-issues.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/comparison-issues.js +86 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/comparison-issues.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/reference-errors.d.ts +32 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/reference-errors.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/reference-errors.js +44 -0
- package/dist/src/lib/analyzers/javascript/quality-checks/reference-errors.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/access-control.d.ts +22 -0
- package/dist/src/lib/analyzers/javascript/security-checks/access-control.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/access-control.js +168 -0
- package/dist/src/lib/analyzers/javascript/security-checks/access-control.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/ai-generated-code.d.ts +25 -0
- package/dist/src/lib/analyzers/javascript/security-checks/ai-generated-code.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/ai-generated-code.js +232 -0
- package/dist/src/lib/analyzers/javascript/security-checks/ai-generated-code.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/authentication-failures.d.ts +27 -0
- package/dist/src/lib/analyzers/javascript/security-checks/authentication-failures.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/authentication-failures.js +222 -0
- package/dist/src/lib/analyzers/javascript/security-checks/authentication-failures.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/credential-crypto.d.ts +28 -0
- package/dist/src/lib/analyzers/javascript/security-checks/credential-crypto.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/credential-crypto.js +176 -0
- package/dist/src/lib/analyzers/javascript/security-checks/credential-crypto.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/enhanced-supply-chain.d.ts +23 -0
- package/dist/src/lib/analyzers/javascript/security-checks/enhanced-supply-chain.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/enhanced-supply-chain.js +113 -0
- package/dist/src/lib/analyzers/javascript/security-checks/enhanced-supply-chain.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/exception-handling.d.ts +28 -0
- package/dist/src/lib/analyzers/javascript/security-checks/exception-handling.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/exception-handling.js +227 -0
- package/dist/src/lib/analyzers/javascript/security-checks/exception-handling.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/injection-attacks.d.ts +32 -0
- package/dist/src/lib/analyzers/javascript/security-checks/injection-attacks.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/injection-attacks.js +260 -0
- package/dist/src/lib/analyzers/javascript/security-checks/injection-attacks.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/insecure-design.d.ts +26 -0
- package/dist/src/lib/analyzers/javascript/security-checks/insecure-design.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/insecure-design.js +164 -0
- package/dist/src/lib/analyzers/javascript/security-checks/insecure-design.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/security-misconfiguration.d.ts +26 -0
- package/dist/src/lib/analyzers/javascript/security-checks/security-misconfiguration.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/security-misconfiguration.js +775 -0
- package/dist/src/lib/analyzers/javascript/security-checks/security-misconfiguration.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/software-integrity.d.ts +25 -0
- package/dist/src/lib/analyzers/javascript/security-checks/software-integrity.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/software-integrity.js +168 -0
- package/dist/src/lib/analyzers/javascript/security-checks/software-integrity.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/storage-security.d.ts +27 -0
- package/dist/src/lib/analyzers/javascript/security-checks/storage-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/storage-security.js +108 -0
- package/dist/src/lib/analyzers/javascript/security-checks/storage-security.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/xss-dom-security.d.ts +28 -0
- package/dist/src/lib/analyzers/javascript/security-checks/xss-dom-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/security-checks/xss-dom-security.js +143 -0
- package/dist/src/lib/analyzers/javascript/security-checks/xss-dom-security.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/syntax/syntax-helpers.d.ts +53 -0
- package/dist/src/lib/analyzers/javascript/syntax/syntax-helpers.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/syntax/syntax-helpers.js +144 -0
- package/dist/src/lib/analyzers/javascript/syntax/syntax-helpers.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/syntax/typescript-syntax.d.ts +72 -0
- package/dist/src/lib/analyzers/javascript/syntax/typescript-syntax.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/syntax/typescript-syntax.js +314 -0
- package/dist/src/lib/analyzers/javascript/syntax/typescript-syntax.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/createVulnerability.d.ts +58 -0
- package/dist/src/lib/analyzers/javascript/utils/createVulnerability.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/createVulnerability.js +71 -0
- package/dist/src/lib/analyzers/javascript/utils/createVulnerability.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/metrics-calculator.d.ts +36 -0
- package/dist/src/lib/analyzers/javascript/utils/metrics-calculator.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/metrics-calculator.js +70 -0
- package/dist/src/lib/analyzers/javascript/utils/metrics-calculator.js.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/performance-analyzer.d.ts +29 -0
- package/dist/src/lib/analyzers/javascript/utils/performance-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript/utils/performance-analyzer.js +55 -0
- package/dist/src/lib/analyzers/javascript/utils/performance-analyzer.js.map +1 -0
- package/dist/src/lib/analyzers/javascript-analyzer.d.ts +95 -0
- package/dist/src/lib/analyzers/javascript-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/javascript-analyzer.js +2141 -0
- package/dist/src/lib/analyzers/javascript-analyzer.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/access-control.d.ts +21 -0
- package/dist/src/lib/analyzers/python/security-checks/access-control.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/access-control.js +305 -0
- package/dist/src/lib/analyzers/python/security-checks/access-control.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/ai-generated-code.d.ts +25 -0
- package/dist/src/lib/analyzers/python/security-checks/ai-generated-code.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/ai-generated-code.js +242 -0
- package/dist/src/lib/analyzers/python/security-checks/ai-generated-code.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/authentication-flaws.d.ts +24 -0
- package/dist/src/lib/analyzers/python/security-checks/authentication-flaws.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/authentication-flaws.js +207 -0
- package/dist/src/lib/analyzers/python/security-checks/authentication-flaws.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/code-quality.d.ts +27 -0
- package/dist/src/lib/analyzers/python/security-checks/code-quality.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/code-quality.js +206 -0
- package/dist/src/lib/analyzers/python/security-checks/code-quality.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/credentials-crypto.d.ts +24 -0
- package/dist/src/lib/analyzers/python/security-checks/credentials-crypto.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/credentials-crypto.js +113 -0
- package/dist/src/lib/analyzers/python/security-checks/credentials-crypto.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/crypto-failures.d.ts +20 -0
- package/dist/src/lib/analyzers/python/security-checks/crypto-failures.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/crypto-failures.js +129 -0
- package/dist/src/lib/analyzers/python/security-checks/crypto-failures.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/data-integrity.d.ts +19 -0
- package/dist/src/lib/analyzers/python/security-checks/data-integrity.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/data-integrity.js +90 -0
- package/dist/src/lib/analyzers/python/security-checks/data-integrity.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/deserialization.d.ts +20 -0
- package/dist/src/lib/analyzers/python/security-checks/deserialization.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/deserialization.js +68 -0
- package/dist/src/lib/analyzers/python/security-checks/deserialization.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/django-security.d.ts +25 -0
- package/dist/src/lib/analyzers/python/security-checks/django-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/django-security.js +180 -0
- package/dist/src/lib/analyzers/python/security-checks/django-security.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/enhanced-supply-chain.d.ts +23 -0
- package/dist/src/lib/analyzers/python/security-checks/enhanced-supply-chain.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/enhanced-supply-chain.js +127 -0
- package/dist/src/lib/analyzers/python/security-checks/enhanced-supply-chain.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/exception-handling.d.ts +23 -0
- package/dist/src/lib/analyzers/python/security-checks/exception-handling.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/exception-handling.js +120 -0
- package/dist/src/lib/analyzers/python/security-checks/exception-handling.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/flask-security.d.ts +24 -0
- package/dist/src/lib/analyzers/python/security-checks/flask-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/flask-security.js +143 -0
- package/dist/src/lib/analyzers/python/security-checks/flask-security.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/injection-attacks.d.ts +28 -0
- package/dist/src/lib/analyzers/python/security-checks/injection-attacks.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/injection-attacks.js +174 -0
- package/dist/src/lib/analyzers/python/security-checks/injection-attacks.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/insecure-design.d.ts +20 -0
- package/dist/src/lib/analyzers/python/security-checks/insecure-design.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/insecure-design.js +160 -0
- package/dist/src/lib/analyzers/python/security-checks/insecure-design.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/logging-failures.d.ts +20 -0
- package/dist/src/lib/analyzers/python/security-checks/logging-failures.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/logging-failures.js +121 -0
- package/dist/src/lib/analyzers/python/security-checks/logging-failures.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/nosql-injection.d.ts +26 -0
- package/dist/src/lib/analyzers/python/security-checks/nosql-injection.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/nosql-injection.js +248 -0
- package/dist/src/lib/analyzers/python/security-checks/nosql-injection.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/security-misconfiguration.d.ts +26 -0
- package/dist/src/lib/analyzers/python/security-checks/security-misconfiguration.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/security-misconfiguration.js +375 -0
- package/dist/src/lib/analyzers/python/security-checks/security-misconfiguration.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/ssrf-detection.d.ts +26 -0
- package/dist/src/lib/analyzers/python/security-checks/ssrf-detection.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/ssrf-detection.js +160 -0
- package/dist/src/lib/analyzers/python/security-checks/ssrf-detection.js.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/web-security.d.ts +23 -0
- package/dist/src/lib/analyzers/python/security-checks/web-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/security-checks/web-security.js +117 -0
- package/dist/src/lib/analyzers/python/security-checks/web-security.js.map +1 -0
- package/dist/src/lib/analyzers/python/utils/createVulnerability.d.ts +58 -0
- package/dist/src/lib/analyzers/python/utils/createVulnerability.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python/utils/createVulnerability.js +71 -0
- package/dist/src/lib/analyzers/python/utils/createVulnerability.js.map +1 -0
- package/dist/src/lib/analyzers/python-analyzer.d.ts +111 -0
- package/dist/src/lib/analyzers/python-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/python-analyzer.js +1600 -0
- package/dist/src/lib/analyzers/python-analyzer.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/ai-providers.d.ts +14 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/ai-providers.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/ai-providers.js +47 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/ai-providers.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/aws.d.ts +13 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/aws.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/aws.js +36 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/aws.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/cloud-providers.d.ts +15 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/cloud-providers.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/cloud-providers.js +68 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/cloud-providers.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/communication.d.ts +15 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/communication.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/communication.js +68 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/communication.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/generic.d.ts +12 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/generic.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/generic.js +45 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/generic.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/github.d.ts +14 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/github.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/github.js +47 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/github.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/stripe.d.ts +13 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/stripe.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/stripe.js +36 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys/stripe.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys.d.ts +15 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys.js +32 -0
- package/dist/src/lib/analyzers/secrets/patterns/api-keys.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/credentials.d.ts +15 -0
- package/dist/src/lib/analyzers/secrets/patterns/credentials.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/credentials.js +68 -0
- package/dist/src/lib/analyzers/secrets/patterns/credentials.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/private-keys.d.ts +16 -0
- package/dist/src/lib/analyzers/secrets/patterns/private-keys.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/private-keys.js +79 -0
- package/dist/src/lib/analyzers/secrets/patterns/private-keys.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/tokens.d.ts +15 -0
- package/dist/src/lib/analyzers/secrets/patterns/tokens.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/patterns/tokens.js +58 -0
- package/dist/src/lib/analyzers/secrets/patterns/tokens.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/secrets-analyzer.d.ts +88 -0
- package/dist/src/lib/analyzers/secrets/secrets-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/secrets-analyzer.js +162 -0
- package/dist/src/lib/analyzers/secrets/secrets-analyzer.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/validators/context-checker.d.ts +56 -0
- package/dist/src/lib/analyzers/secrets/validators/context-checker.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/validators/context-checker.js +199 -0
- package/dist/src/lib/analyzers/secrets/validators/context-checker.js.map +1 -0
- package/dist/src/lib/analyzers/secrets/validators/entropy-checker.d.ts +56 -0
- package/dist/src/lib/analyzers/secrets/validators/entropy-checker.d.ts.map +1 -0
- package/dist/src/lib/analyzers/secrets/validators/entropy-checker.js +102 -0
- package/dist/src/lib/analyzers/secrets/validators/entropy-checker.js.map +1 -0
- package/dist/src/lib/analyzers/security-checks/es6-security.d.ts +38 -0
- package/dist/src/lib/analyzers/security-checks/es6-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/security-checks/es6-security.js +125 -0
- package/dist/src/lib/analyzers/security-checks/es6-security.js.map +1 -0
- package/dist/src/lib/analyzers/security-checks/python-async-security.d.ts +46 -0
- package/dist/src/lib/analyzers/security-checks/python-async-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/security-checks/python-async-security.js +92 -0
- package/dist/src/lib/analyzers/security-checks/python-async-security.js.map +1 -0
- package/dist/src/lib/analyzers/security-checks/react-security.d.ts +49 -0
- package/dist/src/lib/analyzers/security-checks/react-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/security-checks/react-security.js +125 -0
- package/dist/src/lib/analyzers/security-checks/react-security.js.map +1 -0
- package/dist/src/lib/analyzers/types.d.ts +92 -0
- package/dist/src/lib/analyzers/types.d.ts.map +1 -0
- package/dist/src/lib/analyzers/types.js +3 -0
- package/dist/src/lib/analyzers/types.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/access-control.d.ts +19 -0
- package/dist/src/lib/analyzers/typescript/security-checks/access-control.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/access-control.js +210 -0
- package/dist/src/lib/analyzers/typescript/security-checks/access-control.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/ai-generated-code.d.ts +25 -0
- package/dist/src/lib/analyzers/typescript/security-checks/ai-generated-code.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/ai-generated-code.js +242 -0
- package/dist/src/lib/analyzers/typescript/security-checks/ai-generated-code.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/authentication.d.ts +28 -0
- package/dist/src/lib/analyzers/typescript/security-checks/authentication.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/authentication.js +357 -0
- package/dist/src/lib/analyzers/typescript/security-checks/authentication.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-injection.d.ts +26 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-injection.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-injection.js +380 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-injection.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-quality.d.ts +23 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-quality.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-quality.js +109 -0
- package/dist/src/lib/analyzers/typescript/security-checks/code-quality.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/credentials-crypto.d.ts +21 -0
- package/dist/src/lib/analyzers/typescript/security-checks/credentials-crypto.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/credentials-crypto.js +153 -0
- package/dist/src/lib/analyzers/typescript/security-checks/credentials-crypto.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/enhanced-supply-chain.d.ts +23 -0
- package/dist/src/lib/analyzers/typescript/security-checks/enhanced-supply-chain.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/enhanced-supply-chain.js +146 -0
- package/dist/src/lib/analyzers/typescript/security-checks/enhanced-supply-chain.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/exception-handling.d.ts +23 -0
- package/dist/src/lib/analyzers/typescript/security-checks/exception-handling.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/exception-handling.js +187 -0
- package/dist/src/lib/analyzers/typescript/security-checks/exception-handling.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/information-disclosure.d.ts +19 -0
- package/dist/src/lib/analyzers/typescript/security-checks/information-disclosure.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/information-disclosure.js +97 -0
- package/dist/src/lib/analyzers/typescript/security-checks/information-disclosure.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/injection-attacks.d.ts +29 -0
- package/dist/src/lib/analyzers/typescript/security-checks/injection-attacks.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/injection-attacks.js +319 -0
- package/dist/src/lib/analyzers/typescript/security-checks/injection-attacks.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/logging-failures.d.ts +21 -0
- package/dist/src/lib/analyzers/typescript/security-checks/logging-failures.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/logging-failures.js +121 -0
- package/dist/src/lib/analyzers/typescript/security-checks/logging-failures.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/security-misconfiguration.d.ts +27 -0
- package/dist/src/lib/analyzers/typescript/security-checks/security-misconfiguration.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/security-misconfiguration.js +213 -0
- package/dist/src/lib/analyzers/typescript/security-checks/security-misconfiguration.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/type-security.d.ts +19 -0
- package/dist/src/lib/analyzers/typescript/security-checks/type-security.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/security-checks/type-security.js +59 -0
- package/dist/src/lib/analyzers/typescript/security-checks/type-security.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/type-checker.d.ts +17 -0
- package/dist/src/lib/analyzers/typescript/type-checker.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/type-checker.js +515 -0
- package/dist/src/lib/analyzers/typescript/type-checker.js.map +1 -0
- package/dist/src/lib/analyzers/typescript/utils/createVulnerability.d.ts +58 -0
- package/dist/src/lib/analyzers/typescript/utils/createVulnerability.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript/utils/createVulnerability.js +71 -0
- package/dist/src/lib/analyzers/typescript/utils/createVulnerability.js.map +1 -0
- package/dist/src/lib/analyzers/typescript-analyzer.d.ts +116 -0
- package/dist/src/lib/analyzers/typescript-analyzer.d.ts.map +1 -0
- package/dist/src/lib/analyzers/typescript-analyzer.js +1660 -0
- package/dist/src/lib/analyzers/typescript-analyzer.js.map +1 -0
- package/dist/src/lib/security/compliance-mapping.d.ts +29 -0
- package/dist/src/lib/security/compliance-mapping.d.ts.map +1 -0
- package/dist/src/lib/security/compliance-mapping.js +1342 -0
- package/dist/src/lib/security/compliance-mapping.js.map +1 -0
- package/dist/src/lib/security/severity-scoring.d.ts +47 -0
- package/dist/src/lib/security/severity-scoring.d.ts.map +1 -0
- package/dist/src/lib/security/severity-scoring.js +965 -0
- package/dist/src/lib/security/severity-scoring.js.map +1 -0
- package/dist/src/lib/standards/references.d.ts +16 -0
- package/dist/src/lib/standards/references.d.ts.map +1 -0
- package/dist/src/lib/standards/references.js +1161 -0
- package/dist/src/lib/standards/references.js.map +1 -0
- package/dist/src/lib/types/index.d.ts +167 -0
- package/dist/src/lib/types/index.d.ts.map +1 -0
- package/dist/src/lib/types/index.js +3 -0
- package/dist/src/lib/types/index.js.map +1 -0
- package/dist/src/lib/utils/code-cleaner.d.ts +59 -0
- package/dist/src/lib/utils/code-cleaner.d.ts.map +1 -0
- package/dist/src/lib/utils/code-cleaner.js +283 -0
- package/dist/src/lib/utils/code-cleaner.js.map +1 -0
- package/package.json +51 -0
- package/src/commands/auth.ts +308 -0
- package/src/commands/config.ts +226 -0
- package/src/commands/init.ts +202 -0
- package/src/commands/scan.ts +238 -0
- package/src/config/config-loader.ts +175 -0
- package/src/reporters/cli-reporter.ts +282 -0
- package/src/scanner/local-scanner.ts +250 -0
- package/tsconfig.json +24 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,1161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Standards and References Database
|
|
3
|
+
// Links to official documentation and best practices
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.typescriptStandards = exports.javaStandards = exports.pythonStandards = exports.javascriptStandards = void 0;
|
|
6
|
+
exports.getReferencesForIssue = getReferencesForIssue;
|
|
7
|
+
exports.mapErrorToReference = mapErrorToReference;
|
|
8
|
+
// JavaScript/TypeScript Standards
|
|
9
|
+
exports.javascriptStandards = {
|
|
10
|
+
'var-usage': [
|
|
11
|
+
{
|
|
12
|
+
title: 'ESLint: no-var',
|
|
13
|
+
url: 'https://eslint.org/docs/latest/rules/no-var',
|
|
14
|
+
description: 'Require let or const instead of var',
|
|
15
|
+
category: 'rule'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'MDN: let vs var',
|
|
19
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let',
|
|
20
|
+
description: 'Understanding the differences between let, const, and var',
|
|
21
|
+
category: 'documentation'
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
'console-methods': [
|
|
25
|
+
{
|
|
26
|
+
title: 'ESLint: no-console',
|
|
27
|
+
url: 'https://eslint.org/docs/latest/rules/no-console',
|
|
28
|
+
description: 'Disallow the use of console',
|
|
29
|
+
category: 'rule'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: 'MDN: Console API',
|
|
33
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/API/Console',
|
|
34
|
+
description: 'Complete reference for console methods',
|
|
35
|
+
category: 'documentation'
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
'performance-loops': [
|
|
39
|
+
{
|
|
40
|
+
title: 'Performance Best Practices',
|
|
41
|
+
url: 'https://web.dev/fast/',
|
|
42
|
+
description: 'Web performance optimization techniques',
|
|
43
|
+
category: 'guide'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: 'ESLint: prefer-for-of',
|
|
47
|
+
url: 'https://eslint.org/docs/latest/rules/prefer-for-of',
|
|
48
|
+
description: 'Prefer for-of over standard for loops',
|
|
49
|
+
category: 'rule'
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
'syntax-errors': [
|
|
53
|
+
{
|
|
54
|
+
title: 'JavaScript Syntax Guide',
|
|
55
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types',
|
|
56
|
+
description: 'Complete JavaScript syntax reference',
|
|
57
|
+
category: 'documentation'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: 'Common JavaScript Errors',
|
|
61
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors',
|
|
62
|
+
description: 'Understanding and fixing JavaScript errors',
|
|
63
|
+
category: 'guide'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
'security-practices': [
|
|
67
|
+
{
|
|
68
|
+
title: 'OWASP JavaScript Security',
|
|
69
|
+
url: 'https://owasp.org/www-project-top-ten/',
|
|
70
|
+
description: 'Top 10 web application security risks',
|
|
71
|
+
category: 'guide'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'ESLint Security Plugin',
|
|
75
|
+
url: 'https://github.com/eslint-community/eslint-plugin-security',
|
|
76
|
+
description: 'ESLint rules for identifying security vulnerabilities',
|
|
77
|
+
category: 'rule'
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
'typescript-types': [
|
|
81
|
+
{
|
|
82
|
+
title: 'TypeScript Basic Types',
|
|
83
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/everyday-types.html',
|
|
84
|
+
description: 'Understanding TypeScript basic types: string, number, boolean',
|
|
85
|
+
category: 'documentation'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'TypeScript Handbook',
|
|
89
|
+
url: 'https://www.typescriptlang.org/docs/',
|
|
90
|
+
description: 'Complete TypeScript documentation and guides',
|
|
91
|
+
category: 'documentation'
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
'typescript-properties': [
|
|
95
|
+
{
|
|
96
|
+
title: 'TypeScript Object Types',
|
|
97
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/objects.html',
|
|
98
|
+
description: 'How to type object properties in TypeScript',
|
|
99
|
+
category: 'documentation'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: 'Interface Definitions',
|
|
103
|
+
url: 'https://www.typescriptlang.org/docs/handbook/interfaces.html',
|
|
104
|
+
description: 'Defining interfaces and property types',
|
|
105
|
+
category: 'tutorial'
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
'code-quality': [
|
|
109
|
+
{
|
|
110
|
+
title: 'Clean Code Practices',
|
|
111
|
+
url: 'https://github.com/ryanmcdermott/clean-code-javascript',
|
|
112
|
+
description: 'Clean code concepts adapted for JavaScript/TypeScript',
|
|
113
|
+
category: 'guide'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'ESLint: no-commented-out-code',
|
|
117
|
+
url: 'https://eslint.org/docs/latest/rules/',
|
|
118
|
+
description: 'Avoiding commented-out code in production',
|
|
119
|
+
category: 'rule'
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
};
|
|
123
|
+
// Python Standards (PEP)
|
|
124
|
+
exports.pythonStandards = {
|
|
125
|
+
'indentation': [
|
|
126
|
+
{
|
|
127
|
+
title: 'PEP 8: Indentation',
|
|
128
|
+
url: 'https://peps.python.org/pep-0008/#indentation',
|
|
129
|
+
description: 'Official Python style guide for indentation',
|
|
130
|
+
category: 'documentation'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: 'Python Indentation Guide',
|
|
134
|
+
url: 'https://docs.python.org/3/tutorial/controlflow.html',
|
|
135
|
+
description: 'Understanding Python indentation and control flow',
|
|
136
|
+
category: 'tutorial'
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
'f-strings': [
|
|
140
|
+
{
|
|
141
|
+
title: 'PEP 498: Literal String Interpolation',
|
|
142
|
+
url: 'https://peps.python.org/pep-0498/',
|
|
143
|
+
description: 'Official specification for f-string syntax in Python',
|
|
144
|
+
category: 'documentation'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
title: 'Python f-strings Guide',
|
|
148
|
+
url: 'https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals',
|
|
149
|
+
description: 'Complete guide to using formatted string literals',
|
|
150
|
+
category: 'tutorial'
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
'string-formatting': [
|
|
154
|
+
{
|
|
155
|
+
title: 'Python String Formatting',
|
|
156
|
+
url: 'https://docs.python.org/3/library/string.html#format-string-syntax',
|
|
157
|
+
description: 'Official documentation for string formatting syntax',
|
|
158
|
+
category: 'documentation'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
title: 'String Formatting Best Practices',
|
|
162
|
+
url: 'https://realpython.com/python-string-formatting/',
|
|
163
|
+
description: 'Comprehensive guide to Python string formatting methods',
|
|
164
|
+
category: 'guide'
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
'syntax-errors': [
|
|
168
|
+
{
|
|
169
|
+
title: 'Python Syntax Errors Guide',
|
|
170
|
+
url: 'https://docs.python.org/3/tutorial/errors.html#syntax-errors',
|
|
171
|
+
description: 'Understanding and fixing Python syntax errors',
|
|
172
|
+
category: 'documentation'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
title: 'Common Python Syntax Errors',
|
|
176
|
+
url: 'https://realpython.com/invalid-syntax-python/',
|
|
177
|
+
description: 'Guide to identifying and fixing common syntax issues',
|
|
178
|
+
category: 'tutorial'
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
'naming-conventions': [
|
|
182
|
+
{
|
|
183
|
+
title: 'PEP 8: Naming Conventions',
|
|
184
|
+
url: 'https://peps.python.org/pep-0008/#naming-conventions',
|
|
185
|
+
description: 'Official naming conventions for Python code',
|
|
186
|
+
category: 'documentation'
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
title: 'Python Naming Best Practices',
|
|
190
|
+
url: 'https://realpython.com/python-pep8/#naming-conventions',
|
|
191
|
+
description: 'Real Python guide to naming conventions',
|
|
192
|
+
category: 'guide'
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
'type-hints': [
|
|
196
|
+
{
|
|
197
|
+
title: 'PEP 484: Type Hints',
|
|
198
|
+
url: 'https://peps.python.org/pep-0484/',
|
|
199
|
+
description: 'Introduction to type hints in Python',
|
|
200
|
+
category: 'documentation'
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
title: 'Python Type Hints Tutorial',
|
|
204
|
+
url: 'https://docs.python.org/3/library/typing.html',
|
|
205
|
+
description: 'Complete guide to Python typing module',
|
|
206
|
+
category: 'tutorial'
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
'performance': [
|
|
210
|
+
{
|
|
211
|
+
title: 'Python Performance Tips',
|
|
212
|
+
url: 'https://wiki.python.org/moin/PythonSpeed/PerformanceTips',
|
|
213
|
+
description: 'Official Python performance optimization guide',
|
|
214
|
+
category: 'guide'
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
title: 'PEP 289: Generator Expressions',
|
|
218
|
+
url: 'https://peps.python.org/pep-0289/',
|
|
219
|
+
description: 'Memory-efficient iteration patterns',
|
|
220
|
+
category: 'documentation'
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
'ai-hallucination': [
|
|
224
|
+
{
|
|
225
|
+
title: 'Python String Methods',
|
|
226
|
+
url: 'https://docs.python.org/3/library/stdtypes.html#string-methods',
|
|
227
|
+
description: 'Complete reference for Python string methods',
|
|
228
|
+
category: 'documentation'
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
title: 'Python List Methods',
|
|
232
|
+
url: 'https://docs.python.org/3/tutorial/datastructures.html',
|
|
233
|
+
description: 'Official guide to list and dictionary methods',
|
|
234
|
+
category: 'tutorial'
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
'type-errors': [
|
|
238
|
+
{
|
|
239
|
+
title: 'Python TypeError Guide',
|
|
240
|
+
url: 'https://docs.python.org/3/library/exceptions.html#TypeError',
|
|
241
|
+
description: 'Understanding and handling TypeError exceptions',
|
|
242
|
+
category: 'documentation'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
title: 'Python Type Conversions',
|
|
246
|
+
url: 'https://realpython.com/python-type-checking/',
|
|
247
|
+
description: 'Guide to type checking and conversions in Python',
|
|
248
|
+
category: 'guide'
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
'value-errors': [
|
|
252
|
+
{
|
|
253
|
+
title: 'Python ValueError Guide',
|
|
254
|
+
url: 'https://docs.python.org/3/library/exceptions.html#ValueError',
|
|
255
|
+
description: 'Understanding ValueError and proper value validation',
|
|
256
|
+
category: 'documentation'
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
title: 'Input Validation in Python',
|
|
260
|
+
url: 'https://realpython.com/python-input-output/',
|
|
261
|
+
description: 'Best practices for input validation and error handling',
|
|
262
|
+
category: 'guide'
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
'name-errors': [
|
|
266
|
+
{
|
|
267
|
+
title: 'Python NameError Guide',
|
|
268
|
+
url: 'https://docs.python.org/3/library/exceptions.html#NameError',
|
|
269
|
+
description: 'Understanding undefined variables and name errors',
|
|
270
|
+
category: 'documentation'
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
title: 'Python Variable Scope',
|
|
274
|
+
url: 'https://realpython.com/python-scope-legb-rule/',
|
|
275
|
+
description: 'Understanding Python scope and the LEGB rule',
|
|
276
|
+
category: 'tutorial'
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
'attribute-errors': [
|
|
280
|
+
{
|
|
281
|
+
title: 'Python AttributeError Guide',
|
|
282
|
+
url: 'https://docs.python.org/3/library/exceptions.html#AttributeError',
|
|
283
|
+
description: 'Understanding attribute errors and object methods',
|
|
284
|
+
category: 'documentation'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
title: 'Python Object Attributes',
|
|
288
|
+
url: 'https://docs.python.org/3/tutorial/classes.html',
|
|
289
|
+
description: 'Working with object attributes and methods',
|
|
290
|
+
category: 'tutorial'
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
'index-errors': [
|
|
294
|
+
{
|
|
295
|
+
title: 'Python IndexError Guide',
|
|
296
|
+
url: 'https://docs.python.org/3/library/exceptions.html#IndexError',
|
|
297
|
+
description: 'Understanding list index out of range errors',
|
|
298
|
+
category: 'documentation'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
title: 'Python Indexing and Slicing',
|
|
302
|
+
url: 'https://docs.python.org/3/tutorial/introduction.html#lists',
|
|
303
|
+
description: 'Guide to safe indexing and slicing in Python',
|
|
304
|
+
category: 'tutorial'
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
'key-errors': [
|
|
308
|
+
{
|
|
309
|
+
title: 'Python KeyError Guide',
|
|
310
|
+
url: 'https://docs.python.org/3/library/exceptions.html#KeyError',
|
|
311
|
+
description: 'Understanding dictionary key errors',
|
|
312
|
+
category: 'documentation'
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
title: 'Python Dictionary Methods',
|
|
316
|
+
url: 'https://realpython.com/python-dicts/',
|
|
317
|
+
description: 'Safe dictionary access with .get() and defaultdict',
|
|
318
|
+
category: 'guide'
|
|
319
|
+
}
|
|
320
|
+
],
|
|
321
|
+
'import-errors': [
|
|
322
|
+
{
|
|
323
|
+
title: 'Python Import System',
|
|
324
|
+
url: 'https://docs.python.org/3/reference/import.html',
|
|
325
|
+
description: 'Complete guide to Python import system',
|
|
326
|
+
category: 'documentation'
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
title: 'ModuleNotFoundError Guide',
|
|
330
|
+
url: 'https://realpython.com/python-modules-packages/',
|
|
331
|
+
description: 'Understanding and fixing import errors',
|
|
332
|
+
category: 'tutorial'
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
'mutable-defaults': [
|
|
336
|
+
{
|
|
337
|
+
title: 'Python Mutable Default Arguments',
|
|
338
|
+
url: 'https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments',
|
|
339
|
+
description: 'Why mutable default arguments are dangerous',
|
|
340
|
+
category: 'guide'
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
title: 'PEP 20: Zen of Python',
|
|
344
|
+
url: 'https://peps.python.org/pep-0020/',
|
|
345
|
+
description: 'Python design principles and best practices',
|
|
346
|
+
category: 'documentation'
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
'loop-modification': [
|
|
350
|
+
{
|
|
351
|
+
title: 'Python Loop Modification',
|
|
352
|
+
url: 'https://docs.python.org/3/tutorial/controlflow.html#for-statements',
|
|
353
|
+
description: 'Understanding why modifying iterables during iteration fails',
|
|
354
|
+
category: 'documentation'
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
title: 'Safe Iteration Patterns',
|
|
358
|
+
url: 'https://realpython.com/iterate-through-dictionary-python/',
|
|
359
|
+
description: 'How to safely modify collections while iterating',
|
|
360
|
+
category: 'guide'
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
'scope-issues': [
|
|
364
|
+
{
|
|
365
|
+
title: 'Python Global and Nonlocal',
|
|
366
|
+
url: 'https://docs.python.org/3/reference/simple_stmts.html#the-global-statement',
|
|
367
|
+
description: 'Understanding global and nonlocal keywords',
|
|
368
|
+
category: 'documentation'
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
title: 'Python Scope Best Practices',
|
|
372
|
+
url: 'https://realpython.com/python-scope-legb-rule/',
|
|
373
|
+
description: 'Avoiding common scope pitfalls in Python',
|
|
374
|
+
category: 'guide'
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
};
|
|
378
|
+
// Java Standards
|
|
379
|
+
exports.javaStandards = {
|
|
380
|
+
'compilation-errors': [
|
|
381
|
+
{
|
|
382
|
+
title: 'Java Compilation Errors',
|
|
383
|
+
url: 'https://docs.oracle.com/javase/tutorial/getStarted/problems/index.html',
|
|
384
|
+
description: 'Common Java compilation problems and solutions',
|
|
385
|
+
category: 'documentation'
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
title: 'Cannot Find Symbol Error',
|
|
389
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/package/usepkgs.html',
|
|
390
|
+
description: 'Understanding and fixing "cannot find symbol" errors',
|
|
391
|
+
category: 'tutorial'
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
title: 'Java Type System',
|
|
395
|
+
url: 'https://docs.oracle.com/javase/specs/jls/se11/html/jls-4.html',
|
|
396
|
+
description: 'Java Language Specification - Types, Values, and Variables',
|
|
397
|
+
category: 'documentation'
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
'null-pointer': [
|
|
401
|
+
{
|
|
402
|
+
title: 'NullPointerException Guide',
|
|
403
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html',
|
|
404
|
+
description: 'Understanding and preventing NullPointerException',
|
|
405
|
+
category: 'documentation'
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
title: 'Optional Class',
|
|
409
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html',
|
|
410
|
+
description: 'Using Optional to handle null values safely',
|
|
411
|
+
category: 'documentation'
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
title: 'Effective Java: Avoid Null',
|
|
415
|
+
url: 'https://dzone.com/articles/avoiding-null-in-java',
|
|
416
|
+
description: 'Best practices for avoiding null references',
|
|
417
|
+
category: 'guide'
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
'class-cast': [
|
|
421
|
+
{
|
|
422
|
+
title: 'ClassCastException',
|
|
423
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/ClassCastException.html',
|
|
424
|
+
description: 'Understanding ClassCastException and type safety',
|
|
425
|
+
category: 'documentation'
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
title: 'Java Generics',
|
|
429
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/generics/',
|
|
430
|
+
description: 'Using generics for type-safe collections',
|
|
431
|
+
category: 'tutorial'
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
title: 'instanceof Operator',
|
|
435
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op2.html',
|
|
436
|
+
description: 'Safe type checking with instanceof',
|
|
437
|
+
category: 'documentation'
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
'array-bounds': [
|
|
441
|
+
{
|
|
442
|
+
title: 'ArrayIndexOutOfBoundsException',
|
|
443
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html',
|
|
444
|
+
description: 'Understanding array index bounds',
|
|
445
|
+
category: 'documentation'
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
title: 'Java Arrays',
|
|
449
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html',
|
|
450
|
+
description: 'Working safely with arrays in Java',
|
|
451
|
+
category: 'tutorial'
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
'illegal-argument': [
|
|
455
|
+
{
|
|
456
|
+
title: 'IllegalArgumentException',
|
|
457
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html',
|
|
458
|
+
description: 'Proper argument validation and exception handling',
|
|
459
|
+
category: 'documentation'
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
title: 'Input Validation Best Practices',
|
|
463
|
+
url: 'https://owasp.org/www-project-proactive-controls/v3/en/c5-validate-inputs',
|
|
464
|
+
description: 'OWASP guide to input validation',
|
|
465
|
+
category: 'guide'
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
'concurrency-issues': [
|
|
469
|
+
{
|
|
470
|
+
title: 'ConcurrentModificationException',
|
|
471
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/util/ConcurrentModificationException.html',
|
|
472
|
+
description: 'Understanding concurrent modification errors',
|
|
473
|
+
category: 'documentation'
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
title: 'Java Concurrency Tutorial',
|
|
477
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/concurrency/',
|
|
478
|
+
description: 'Complete guide to Java concurrency',
|
|
479
|
+
category: 'tutorial'
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
title: 'synchronized Keyword',
|
|
483
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/concurrency/sync.html',
|
|
484
|
+
description: 'Thread synchronization in Java',
|
|
485
|
+
category: 'documentation'
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
title: 'Effective Java: Concurrency',
|
|
489
|
+
url: 'https://www.oracle.com/technical-resources/articles/java/fork-join.html',
|
|
490
|
+
description: 'Best practices for concurrent programming',
|
|
491
|
+
category: 'guide'
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
'memory-errors': [
|
|
495
|
+
{
|
|
496
|
+
title: 'OutOfMemoryError',
|
|
497
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/OutOfMemoryError.html',
|
|
498
|
+
description: 'Understanding and resolving memory errors',
|
|
499
|
+
category: 'documentation'
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
title: 'StackOverflowError',
|
|
503
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/StackOverflowError.html',
|
|
504
|
+
description: 'Understanding stack overflow errors',
|
|
505
|
+
category: 'documentation'
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
title: 'Java Memory Management',
|
|
509
|
+
url: 'https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html',
|
|
510
|
+
description: 'Garbage collection and memory management',
|
|
511
|
+
category: 'tutorial'
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
'io-exceptions': [
|
|
515
|
+
{
|
|
516
|
+
title: 'IOException',
|
|
517
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html',
|
|
518
|
+
description: 'Handling IO exceptions properly',
|
|
519
|
+
category: 'documentation'
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
title: 'Try-with-resources',
|
|
523
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html',
|
|
524
|
+
description: 'Automatic resource management with try-with-resources',
|
|
525
|
+
category: 'tutorial'
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
title: 'Java I/O Best Practices',
|
|
529
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/io/',
|
|
530
|
+
description: 'Complete guide to Java I/O operations',
|
|
531
|
+
category: 'guide'
|
|
532
|
+
}
|
|
533
|
+
],
|
|
534
|
+
'sql-injection': [
|
|
535
|
+
{
|
|
536
|
+
title: 'PreparedStatement',
|
|
537
|
+
url: 'https://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html',
|
|
538
|
+
description: 'Using PreparedStatement to prevent SQL injection',
|
|
539
|
+
category: 'tutorial'
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
title: 'OWASP SQL Injection',
|
|
543
|
+
url: 'https://owasp.org/www-community/attacks/SQL_Injection',
|
|
544
|
+
description: 'Understanding and preventing SQL injection attacks',
|
|
545
|
+
category: 'guide'
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
title: 'Java SQL Security',
|
|
549
|
+
url: 'https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html',
|
|
550
|
+
description: 'SQL injection prevention cheat sheet',
|
|
551
|
+
category: 'guide'
|
|
552
|
+
}
|
|
553
|
+
],
|
|
554
|
+
'serialization': [
|
|
555
|
+
{
|
|
556
|
+
title: 'Java Serialization',
|
|
557
|
+
url: 'https://docs.oracle.com/javase/8/docs/technotes/guides/serialization/',
|
|
558
|
+
description: 'Java Object Serialization Specification',
|
|
559
|
+
category: 'documentation'
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
title: 'Serialization Security',
|
|
563
|
+
url: 'https://owasp.org/www-community/vulnerabilities/Deserialization_of_untrusted_data',
|
|
564
|
+
description: 'OWASP guide to deserialization vulnerabilities',
|
|
565
|
+
category: 'guide'
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
title: 'Effective Java: Serialization',
|
|
569
|
+
url: 'https://www.oracle.com/technical-resources/articles/java/serializationapi.html',
|
|
570
|
+
description: 'Best practices for safe serialization',
|
|
571
|
+
category: 'guide'
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
'collections-performance': [
|
|
575
|
+
{
|
|
576
|
+
title: 'Java Collections Framework',
|
|
577
|
+
url: 'https://docs.oracle.com/javase/8/docs/technotes/guides/collections/overview.html',
|
|
578
|
+
description: 'Complete collections framework overview',
|
|
579
|
+
category: 'documentation'
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
title: 'ArrayList vs Vector',
|
|
583
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html',
|
|
584
|
+
description: 'Why ArrayList is preferred over Vector',
|
|
585
|
+
category: 'documentation'
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
title: 'HashMap vs Hashtable',
|
|
589
|
+
url: 'https://docs.oracle.com/javase/tutorial/collections/implementations/map.html',
|
|
590
|
+
description: 'Choosing the right Map implementation',
|
|
591
|
+
category: 'tutorial'
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
'string-concatenation': [
|
|
595
|
+
{
|
|
596
|
+
title: 'StringBuilder',
|
|
597
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html',
|
|
598
|
+
description: 'Efficient string concatenation with StringBuilder',
|
|
599
|
+
category: 'documentation'
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
title: 'String Performance',
|
|
603
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/data/buffers.html',
|
|
604
|
+
description: 'String buffers and builders for performance',
|
|
605
|
+
category: 'tutorial'
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
'resource-leaks': [
|
|
609
|
+
{
|
|
610
|
+
title: 'AutoCloseable Interface',
|
|
611
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html',
|
|
612
|
+
description: 'Understanding AutoCloseable resources',
|
|
613
|
+
category: 'documentation'
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
title: 'Resource Leak Prevention',
|
|
617
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html',
|
|
618
|
+
description: 'Preventing resource leaks with try-with-resources',
|
|
619
|
+
category: 'tutorial'
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
'naming-conventions': [
|
|
623
|
+
{
|
|
624
|
+
title: 'Java Naming Conventions',
|
|
625
|
+
url: 'https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html',
|
|
626
|
+
description: 'Official Oracle Java naming conventions',
|
|
627
|
+
category: 'documentation'
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
title: 'Google Java Style Guide',
|
|
631
|
+
url: 'https://google.github.io/styleguide/javaguide.html',
|
|
632
|
+
description: 'Google\'s comprehensive Java style guide',
|
|
633
|
+
category: 'guide'
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
'access-modifiers': [
|
|
637
|
+
{
|
|
638
|
+
title: 'Access Control',
|
|
639
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html',
|
|
640
|
+
description: 'Controlling access to members of a class',
|
|
641
|
+
category: 'documentation'
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
title: 'Effective Java: Minimize Accessibility',
|
|
645
|
+
url: 'https://www.oracle.com/technical-resources/articles/java/effective-java-item15.html',
|
|
646
|
+
description: 'Best practices for access modifiers',
|
|
647
|
+
category: 'guide'
|
|
648
|
+
}
|
|
649
|
+
],
|
|
650
|
+
'class-design': [
|
|
651
|
+
{
|
|
652
|
+
title: 'Effective Java: Item 15',
|
|
653
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html',
|
|
654
|
+
description: 'Minimize the accessibility of classes and members',
|
|
655
|
+
category: 'documentation'
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
title: 'Java OOP Best Practices',
|
|
659
|
+
url: 'https://docs.oracle.com/javase/tutorial/java/concepts/',
|
|
660
|
+
description: 'Object-oriented programming concepts in Java',
|
|
661
|
+
category: 'tutorial'
|
|
662
|
+
}
|
|
663
|
+
],
|
|
664
|
+
'performance': [
|
|
665
|
+
{
|
|
666
|
+
title: 'Java Performance Tuning',
|
|
667
|
+
url: 'https://docs.oracle.com/javase/8/docs/technotes/guides/vm/performance-enhancements-7.html',
|
|
668
|
+
description: 'JVM performance enhancements and best practices',
|
|
669
|
+
category: 'guide'
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
title: 'Collections Performance',
|
|
673
|
+
url: 'https://docs.oracle.com/javase/tutorial/collections/implementations/',
|
|
674
|
+
description: 'Choosing the right collection for performance',
|
|
675
|
+
category: 'documentation'
|
|
676
|
+
}
|
|
677
|
+
],
|
|
678
|
+
'security': [
|
|
679
|
+
{
|
|
680
|
+
title: 'Java Security Guidelines',
|
|
681
|
+
url: 'https://www.oracle.com/java/technologies/javase/seccodeguide.html',
|
|
682
|
+
description: 'Secure coding guidelines for Java',
|
|
683
|
+
category: 'guide'
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
title: 'OWASP Java Security',
|
|
687
|
+
url: 'https://owasp.org/www-project-top-ten/',
|
|
688
|
+
description: 'Security vulnerabilities in Java applications',
|
|
689
|
+
category: 'guide'
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
'deprecated-apis': [
|
|
693
|
+
{
|
|
694
|
+
title: 'Java Deprecated API',
|
|
695
|
+
url: 'https://docs.oracle.com/javase/8/docs/api/deprecated-list.html',
|
|
696
|
+
description: 'List of deprecated Java APIs',
|
|
697
|
+
category: 'documentation'
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
title: 'Migration Guide',
|
|
701
|
+
url: 'https://docs.oracle.com/javase/8/docs/technotes/guides/lang/enhancements.html',
|
|
702
|
+
description: 'Modern alternatives to deprecated APIs',
|
|
703
|
+
category: 'guide'
|
|
704
|
+
}
|
|
705
|
+
],
|
|
706
|
+
'exception-handling': [
|
|
707
|
+
{
|
|
708
|
+
title: 'Java Exception Handling',
|
|
709
|
+
url: 'https://docs.oracle.com/javase/tutorial/essential/exceptions/',
|
|
710
|
+
description: 'Complete guide to exception handling in Java',
|
|
711
|
+
category: 'tutorial'
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
title: 'Effective Java: Exceptions',
|
|
715
|
+
url: 'https://www.oracle.com/technical-resources/articles/enterprise-architecture/effective-exceptions.html',
|
|
716
|
+
description: 'Best practices for exception handling',
|
|
717
|
+
category: 'guide'
|
|
718
|
+
}
|
|
719
|
+
]
|
|
720
|
+
};
|
|
721
|
+
// TypeScript Standards
|
|
722
|
+
exports.typescriptStandards = {
|
|
723
|
+
'type-errors': [
|
|
724
|
+
{
|
|
725
|
+
title: 'TypeScript: Type Compatibility',
|
|
726
|
+
url: 'https://www.typescriptlang.org/docs/handbook/type-compatibility.html',
|
|
727
|
+
description: 'Understanding type assignability and compatibility in TypeScript',
|
|
728
|
+
category: 'documentation'
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
title: 'TypeScript: Strict Null Checks',
|
|
732
|
+
url: 'https://www.typescriptlang.org/tsconfig#strictNullChecks',
|
|
733
|
+
description: 'Enabling strict null checking to prevent null/undefined errors',
|
|
734
|
+
category: 'documentation'
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
title: 'TypeScript: Type Inference',
|
|
738
|
+
url: 'https://www.typescriptlang.org/docs/handbook/type-inference.html',
|
|
739
|
+
description: 'How TypeScript infers types and detects type errors',
|
|
740
|
+
category: 'tutorial'
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
'type-assertions': [
|
|
744
|
+
{
|
|
745
|
+
title: 'TypeScript: Type Assertions',
|
|
746
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions',
|
|
747
|
+
description: 'Safe and unsafe ways to assert types',
|
|
748
|
+
category: 'documentation'
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
title: 'TypeScript: Type Guards and Narrowing',
|
|
752
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/narrowing.html',
|
|
753
|
+
description: 'Using type guards to safely narrow types',
|
|
754
|
+
category: 'tutorial'
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
title: 'TypeScript: Const Assertions',
|
|
758
|
+
url: 'https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions',
|
|
759
|
+
description: 'Using const assertions for literal types',
|
|
760
|
+
category: 'documentation'
|
|
761
|
+
}
|
|
762
|
+
],
|
|
763
|
+
'generics': [
|
|
764
|
+
{
|
|
765
|
+
title: 'TypeScript: Generics Handbook',
|
|
766
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/generics.html',
|
|
767
|
+
description: 'Complete guide to TypeScript generics',
|
|
768
|
+
category: 'documentation'
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
title: 'TypeScript: Generic Constraints',
|
|
772
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints',
|
|
773
|
+
description: 'Constraining generic types with extends',
|
|
774
|
+
category: 'tutorial'
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
title: 'TypeScript: Advanced Types',
|
|
778
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/types-from-types.html',
|
|
779
|
+
description: 'Creating types from other types',
|
|
780
|
+
category: 'guide'
|
|
781
|
+
}
|
|
782
|
+
],
|
|
783
|
+
'unions-intersections': [
|
|
784
|
+
{
|
|
785
|
+
title: 'TypeScript: Union Types',
|
|
786
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types',
|
|
787
|
+
description: 'Working with union types in TypeScript',
|
|
788
|
+
category: 'documentation'
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
title: 'TypeScript: Type Narrowing',
|
|
792
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/narrowing.html',
|
|
793
|
+
description: 'Narrowing union types to specific types',
|
|
794
|
+
category: 'tutorial'
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
title: 'TypeScript: Discriminated Unions',
|
|
798
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions',
|
|
799
|
+
description: 'Using discriminated unions for type safety',
|
|
800
|
+
category: 'guide'
|
|
801
|
+
}
|
|
802
|
+
],
|
|
803
|
+
'classes-interfaces': [
|
|
804
|
+
{
|
|
805
|
+
title: 'TypeScript: Classes',
|
|
806
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/classes.html',
|
|
807
|
+
description: 'Complete guide to TypeScript classes',
|
|
808
|
+
category: 'documentation'
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
title: 'TypeScript: Interfaces',
|
|
812
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/objects.html',
|
|
813
|
+
description: 'Defining interfaces and object types',
|
|
814
|
+
category: 'documentation'
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
title: 'TypeScript: Abstract Classes',
|
|
818
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/classes.html#abstract-classes-and-members',
|
|
819
|
+
description: 'Using abstract classes and methods',
|
|
820
|
+
category: 'tutorial'
|
|
821
|
+
}
|
|
822
|
+
],
|
|
823
|
+
'async-promises': [
|
|
824
|
+
{
|
|
825
|
+
title: 'TypeScript: Async Functions',
|
|
826
|
+
url: 'https://www.typescriptlang.org/docs/handbook/release-notes/typescript-1-7.html#asyncawait',
|
|
827
|
+
description: 'Typing async functions and promises',
|
|
828
|
+
category: 'documentation'
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
title: 'TypeScript: Promise Type Safety',
|
|
832
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#promises',
|
|
833
|
+
description: 'Ensuring type safety with Promises',
|
|
834
|
+
category: 'tutorial'
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
title: 'TypeScript: Error Handling in Async',
|
|
838
|
+
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ#why-are-some-errors-only-reported-with-strictnullchecks',
|
|
839
|
+
description: 'Handling errors in async/await code',
|
|
840
|
+
category: 'guide'
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
'modules': [
|
|
844
|
+
{
|
|
845
|
+
title: 'TypeScript: Module Resolution',
|
|
846
|
+
url: 'https://www.typescriptlang.org/docs/handbook/module-resolution.html',
|
|
847
|
+
description: 'Understanding how TypeScript resolves modules',
|
|
848
|
+
category: 'documentation'
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
title: 'TypeScript: Module Augmentation',
|
|
852
|
+
url: 'https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation',
|
|
853
|
+
description: 'Augmenting existing modules',
|
|
854
|
+
category: 'tutorial'
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
title: 'TypeScript: Ambient Modules',
|
|
858
|
+
url: 'https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules',
|
|
859
|
+
description: 'Working with ambient module declarations',
|
|
860
|
+
category: 'guide'
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
'decorators': [
|
|
864
|
+
{
|
|
865
|
+
title: 'TypeScript: Decorators Guide',
|
|
866
|
+
url: 'https://www.typescriptlang.org/docs/handbook/decorators.html',
|
|
867
|
+
description: 'Using experimental decorators in TypeScript',
|
|
868
|
+
category: 'documentation'
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
title: 'TypeScript: Experimental Features',
|
|
872
|
+
url: 'https://www.typescriptlang.org/tsconfig#experimentalDecorators',
|
|
873
|
+
description: 'Enabling experimental decorator support',
|
|
874
|
+
category: 'documentation'
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
title: 'TypeScript: Metadata Reflection',
|
|
878
|
+
url: 'https://github.com/rbuckton/reflect-metadata',
|
|
879
|
+
description: 'Using reflect-metadata with decorators',
|
|
880
|
+
category: 'guide'
|
|
881
|
+
}
|
|
882
|
+
],
|
|
883
|
+
'mapped-conditional': [
|
|
884
|
+
{
|
|
885
|
+
title: 'TypeScript: Mapped Types',
|
|
886
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/mapped-types.html',
|
|
887
|
+
description: 'Creating types based on existing types',
|
|
888
|
+
category: 'documentation'
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
title: 'TypeScript: Conditional Types',
|
|
892
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/conditional-types.html',
|
|
893
|
+
description: 'Using conditional types for advanced patterns',
|
|
894
|
+
category: 'tutorial'
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
title: 'TypeScript: Template Literal Types',
|
|
898
|
+
url: 'https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html',
|
|
899
|
+
description: 'Using template literal types',
|
|
900
|
+
category: 'guide'
|
|
901
|
+
}
|
|
902
|
+
],
|
|
903
|
+
'strict-mode': [
|
|
904
|
+
{
|
|
905
|
+
title: 'TypeScript: Strict Mode Options',
|
|
906
|
+
url: 'https://www.typescriptlang.org/tsconfig#strict',
|
|
907
|
+
description: 'Understanding all strict mode compiler options',
|
|
908
|
+
category: 'documentation'
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
title: 'TypeScript: Compiler Options Reference',
|
|
912
|
+
url: 'https://www.typescriptlang.org/tsconfig',
|
|
913
|
+
description: 'Complete TypeScript compiler configuration',
|
|
914
|
+
category: 'documentation'
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
title: 'TypeScript: strictNullChecks',
|
|
918
|
+
url: 'https://www.typescriptlang.org/tsconfig#strictNullChecks',
|
|
919
|
+
description: 'Preventing null and undefined errors',
|
|
920
|
+
category: 'tutorial'
|
|
921
|
+
}
|
|
922
|
+
],
|
|
923
|
+
'any-propagation': [
|
|
924
|
+
{
|
|
925
|
+
title: 'TypeScript: Avoiding Any',
|
|
926
|
+
url: 'https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#any',
|
|
927
|
+
description: 'Best practices for avoiding the any type',
|
|
928
|
+
category: 'guide'
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
title: 'TypeScript: Type Safety Best Practices',
|
|
932
|
+
url: 'https://github.com/microsoft/TypeScript/wiki/Performance#using-type-annotations',
|
|
933
|
+
description: 'Maintaining type safety across your codebase',
|
|
934
|
+
category: 'guide'
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
title: 'TypeScript: noImplicitAny',
|
|
938
|
+
url: 'https://www.typescriptlang.org/tsconfig#noImplicitAny',
|
|
939
|
+
description: 'Preventing implicit any types',
|
|
940
|
+
category: 'documentation'
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
'performance': [
|
|
944
|
+
{
|
|
945
|
+
title: 'TypeScript: Performance Guide',
|
|
946
|
+
url: 'https://github.com/microsoft/TypeScript/wiki/Performance',
|
|
947
|
+
description: 'Official TypeScript performance optimization guide',
|
|
948
|
+
category: 'guide'
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
title: 'TypeScript: Type Complexity Analysis',
|
|
952
|
+
url: 'https://github.com/microsoft/TypeScript/wiki/Performance#preferring-base-types-over-unions',
|
|
953
|
+
description: 'Analyzing and reducing type complexity',
|
|
954
|
+
category: 'tutorial'
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
title: 'TypeScript: Build Performance',
|
|
958
|
+
url: 'https://www.typescriptlang.org/docs/handbook/project-references.html',
|
|
959
|
+
description: 'Improving compilation performance',
|
|
960
|
+
category: 'documentation'
|
|
961
|
+
}
|
|
962
|
+
]
|
|
963
|
+
};
|
|
964
|
+
// Helper function to get references for a specific issue
|
|
965
|
+
function getReferencesForIssue(language, issueType) {
|
|
966
|
+
switch (language.toLowerCase()) {
|
|
967
|
+
case 'javascript':
|
|
968
|
+
return exports.javascriptStandards[issueType] || [];
|
|
969
|
+
case 'typescript':
|
|
970
|
+
return exports.typescriptStandards[issueType] || exports.javascriptStandards[issueType] || [];
|
|
971
|
+
case 'python':
|
|
972
|
+
return exports.pythonStandards[issueType] || [];
|
|
973
|
+
case 'java':
|
|
974
|
+
return exports.javaStandards[issueType] || [];
|
|
975
|
+
default:
|
|
976
|
+
return [];
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
// Map common error types to reference categories
|
|
980
|
+
function mapErrorToReference(errorMessage, language) {
|
|
981
|
+
const message = errorMessage.toLowerCase();
|
|
982
|
+
if (message.includes('var') && message.includes('detectado')) {
|
|
983
|
+
return getReferencesForIssue(language, 'var-usage');
|
|
984
|
+
}
|
|
985
|
+
if (message.includes('console.log') || message.includes('ponto extra')) {
|
|
986
|
+
return getReferencesForIssue(language, 'console-methods');
|
|
987
|
+
}
|
|
988
|
+
if (message.includes('loop') && message.includes('length')) {
|
|
989
|
+
return getReferencesForIssue(language, 'performance-loops');
|
|
990
|
+
}
|
|
991
|
+
// TypeScript specific errors
|
|
992
|
+
if (message.includes('tipo typescript') || message.includes('typescript detectado')) {
|
|
993
|
+
return getReferencesForIssue(language, 'typescript-types');
|
|
994
|
+
}
|
|
995
|
+
if (message.includes('propriedade comentada') || message.includes('commented property')) {
|
|
996
|
+
return getReferencesForIssue(language, 'code-quality');
|
|
997
|
+
}
|
|
998
|
+
if (message.includes('propriedade') && (message.includes('sintaxe') || message.includes('incorreta'))) {
|
|
999
|
+
return getReferencesForIssue(language, 'typescript-properties');
|
|
1000
|
+
}
|
|
1001
|
+
if (message.includes('sintaxe') || message.includes('syntax')) {
|
|
1002
|
+
return getReferencesForIssue(language, 'syntax-errors');
|
|
1003
|
+
}
|
|
1004
|
+
// Enhanced security patterns
|
|
1005
|
+
if (message.includes('sql injection') || message.includes('segurança') ||
|
|
1006
|
+
message.includes('eval(') || message.includes('eval()') ||
|
|
1007
|
+
message.includes('function constructor') ||
|
|
1008
|
+
message.includes('xss') || message.includes('innerhtml') || message.includes('outerhtml') ||
|
|
1009
|
+
message.includes('script injection') || message.includes('code injection') ||
|
|
1010
|
+
message.includes('dangerous') || message.includes('vulnerability') ||
|
|
1011
|
+
message.includes('security') || message.includes('attack') ||
|
|
1012
|
+
message.includes('malicious') || message.includes('exploit')) {
|
|
1013
|
+
return getReferencesForIssue(language, 'security-practices');
|
|
1014
|
+
}
|
|
1015
|
+
if (message.includes('indentação') || message.includes('indentation')) {
|
|
1016
|
+
return getReferencesForIssue(language, 'indentation');
|
|
1017
|
+
}
|
|
1018
|
+
if (message.includes('nomeação') || message.includes('naming') || message.includes('camelcase')) {
|
|
1019
|
+
return getReferencesForIssue(language, 'naming-conventions');
|
|
1020
|
+
}
|
|
1021
|
+
// Python-specific error mappings
|
|
1022
|
+
if (language === 'python') {
|
|
1023
|
+
if (message.includes('f-string') || message.includes('chave não fechada')) {
|
|
1024
|
+
return getReferencesForIssue(language, 'f-strings');
|
|
1025
|
+
}
|
|
1026
|
+
if (message.includes('format') || message.includes('argumentos extras') || message.includes('placeholder')) {
|
|
1027
|
+
return getReferencesForIssue(language, 'string-formatting');
|
|
1028
|
+
}
|
|
1029
|
+
if (message.includes('dois pontos') || message.includes('parêntese') || message.includes('chave') || message.includes('colchete')) {
|
|
1030
|
+
return getReferencesForIssue(language, 'syntax-errors');
|
|
1031
|
+
}
|
|
1032
|
+
if (message.includes('ai hallucination') || message.includes('método') || message.includes('method')) {
|
|
1033
|
+
return getReferencesForIssue(language, 'ai-hallucination');
|
|
1034
|
+
}
|
|
1035
|
+
if (message.includes('typeerror') || message.includes('tipo incorreto')) {
|
|
1036
|
+
return getReferencesForIssue(language, 'type-errors');
|
|
1037
|
+
}
|
|
1038
|
+
if (message.includes('valueerror') || message.includes('valor') || message.includes('conversão')) {
|
|
1039
|
+
return getReferencesForIssue(language, 'value-errors');
|
|
1040
|
+
}
|
|
1041
|
+
if (message.includes('nameerror') || message.includes('não definida') || message.includes('não está definida')) {
|
|
1042
|
+
return getReferencesForIssue(language, 'name-errors');
|
|
1043
|
+
}
|
|
1044
|
+
if (message.includes('attributeerror') || message.includes('atributo') || message.includes('método inexistente')) {
|
|
1045
|
+
return getReferencesForIssue(language, 'attribute-errors');
|
|
1046
|
+
}
|
|
1047
|
+
if (message.includes('indexerror') || message.includes('índice') || message.includes('out of range')) {
|
|
1048
|
+
return getReferencesForIssue(language, 'index-errors');
|
|
1049
|
+
}
|
|
1050
|
+
if (message.includes('keyerror') || message.includes('chave inexistente') || message.includes('dictionary')) {
|
|
1051
|
+
return getReferencesForIssue(language, 'key-errors');
|
|
1052
|
+
}
|
|
1053
|
+
if (message.includes('import') || message.includes('modulenotfound') || message.includes('módulo')) {
|
|
1054
|
+
return getReferencesForIssue(language, 'import-errors');
|
|
1055
|
+
}
|
|
1056
|
+
if (message.includes('mutable') || message.includes('argumento padrão') || message.includes('default argument')) {
|
|
1057
|
+
return getReferencesForIssue(language, 'mutable-defaults');
|
|
1058
|
+
}
|
|
1059
|
+
if (message.includes('modificar') && message.includes('loop')) {
|
|
1060
|
+
return getReferencesForIssue(language, 'loop-modification');
|
|
1061
|
+
}
|
|
1062
|
+
if (message.includes('global') || message.includes('nonlocal') || message.includes('escopo')) {
|
|
1063
|
+
return getReferencesForIssue(language, 'scope-issues');
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
// Java-specific error mappings
|
|
1067
|
+
if (language === 'java') {
|
|
1068
|
+
if (message.includes('nullpointer') || message.includes('null') && message.includes('risco')) {
|
|
1069
|
+
return getReferencesForIssue(language, 'null-pointer');
|
|
1070
|
+
}
|
|
1071
|
+
if (message.includes('cannot find symbol') || message.includes('incompatible types') || message.includes('compilação')) {
|
|
1072
|
+
return getReferencesForIssue(language, 'compilation-errors');
|
|
1073
|
+
}
|
|
1074
|
+
if (message.includes('classcast') || message.includes('cast') || message.includes('tipo incompatível')) {
|
|
1075
|
+
return getReferencesForIssue(language, 'class-cast');
|
|
1076
|
+
}
|
|
1077
|
+
if (message.includes('arrayindex') || message.includes('array') && message.includes('bounds')) {
|
|
1078
|
+
return getReferencesForIssue(language, 'array-bounds');
|
|
1079
|
+
}
|
|
1080
|
+
if (message.includes('illegalargument') || message.includes('validação') || message.includes('argumento')) {
|
|
1081
|
+
return getReferencesForIssue(language, 'illegal-argument');
|
|
1082
|
+
}
|
|
1083
|
+
if (message.includes('concurrentmodification') || message.includes('synchronized') || message.includes('concorrência')) {
|
|
1084
|
+
return getReferencesForIssue(language, 'concurrency-issues');
|
|
1085
|
+
}
|
|
1086
|
+
if (message.includes('outofmemory') || message.includes('stackoverflow') || message.includes('memória')) {
|
|
1087
|
+
return getReferencesForIssue(language, 'memory-errors');
|
|
1088
|
+
}
|
|
1089
|
+
if (message.includes('ioexception') || message.includes('file') || message.includes('arquivo')) {
|
|
1090
|
+
return getReferencesForIssue(language, 'io-exceptions');
|
|
1091
|
+
}
|
|
1092
|
+
if (message.includes('sql injection') || message.includes('preparedstatement') || message.includes('sql')) {
|
|
1093
|
+
return getReferencesForIssue(language, 'sql-injection');
|
|
1094
|
+
}
|
|
1095
|
+
if (message.includes('serializ') || message.includes('deserializ')) {
|
|
1096
|
+
return getReferencesForIssue(language, 'serialization');
|
|
1097
|
+
}
|
|
1098
|
+
if (message.includes('vector') || message.includes('hashtable') || message.includes('arraylist') || message.includes('hashmap')) {
|
|
1099
|
+
return getReferencesForIssue(language, 'collections-performance');
|
|
1100
|
+
}
|
|
1101
|
+
if (message.includes('stringbuilder') || message.includes('concatenação') && message.includes('string')) {
|
|
1102
|
+
return getReferencesForIssue(language, 'string-concatenation');
|
|
1103
|
+
}
|
|
1104
|
+
if (message.includes('resource') && message.includes('leak') || message.includes('try-with-resources') || message.includes('autocloseable')) {
|
|
1105
|
+
return getReferencesForIssue(language, 'resource-leaks');
|
|
1106
|
+
}
|
|
1107
|
+
if (message.includes('camelcase') || message.includes('pascalcase') || message.includes('nome') || message.includes('naming')) {
|
|
1108
|
+
return getReferencesForIssue(language, 'naming-conventions');
|
|
1109
|
+
}
|
|
1110
|
+
if (message.includes('modificador') || message.includes('access modifier') || message.includes('public') || message.includes('private')) {
|
|
1111
|
+
return getReferencesForIssue(language, 'access-modifiers');
|
|
1112
|
+
}
|
|
1113
|
+
if (message.includes('deprecated') || message.includes('obsoleto')) {
|
|
1114
|
+
return getReferencesForIssue(language, 'deprecated-apis');
|
|
1115
|
+
}
|
|
1116
|
+
if (message.includes('exception') || message.includes('catch') || message.includes('throw')) {
|
|
1117
|
+
return getReferencesForIssue(language, 'exception-handling');
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
// TypeScript-specific error mappings
|
|
1121
|
+
if (language === 'typescript') {
|
|
1122
|
+
if (message.includes('not assignable') || message.includes('type compatibility') || message.includes('incompatible types')) {
|
|
1123
|
+
return getReferencesForIssue(language, 'type-errors');
|
|
1124
|
+
}
|
|
1125
|
+
if (message.includes('type assertion') || message.includes('as ') || message.includes('type guard') || message.includes('non-null assertion')) {
|
|
1126
|
+
return getReferencesForIssue(language, 'type-assertions');
|
|
1127
|
+
}
|
|
1128
|
+
if (message.includes('generic') || message.includes('type parameter') || message.includes('constraint')) {
|
|
1129
|
+
return getReferencesForIssue(language, 'generics');
|
|
1130
|
+
}
|
|
1131
|
+
if (message.includes('union') || message.includes('intersection') || message.includes('discriminated') || message.includes('narrowing')) {
|
|
1132
|
+
return getReferencesForIssue(language, 'unions-intersections');
|
|
1133
|
+
}
|
|
1134
|
+
if (message.includes('class') || message.includes('interface') || message.includes('implements') || message.includes('abstract')) {
|
|
1135
|
+
return getReferencesForIssue(language, 'classes-interfaces');
|
|
1136
|
+
}
|
|
1137
|
+
if (message.includes('async') || message.includes('promise') || message.includes('await')) {
|
|
1138
|
+
return getReferencesForIssue(language, 'async-promises');
|
|
1139
|
+
}
|
|
1140
|
+
if (message.includes('import') || message.includes('export') || message.includes('module') || message.includes('circular dependency')) {
|
|
1141
|
+
return getReferencesForIssue(language, 'modules');
|
|
1142
|
+
}
|
|
1143
|
+
if (message.includes('decorator') || message.includes('experimental')) {
|
|
1144
|
+
return getReferencesForIssue(language, 'decorators');
|
|
1145
|
+
}
|
|
1146
|
+
if (message.includes('mapped') || message.includes('conditional type') || message.includes('template literal')) {
|
|
1147
|
+
return getReferencesForIssue(language, 'mapped-conditional');
|
|
1148
|
+
}
|
|
1149
|
+
if (message.includes('strict') || message.includes('strictnullchecks') || message.includes('noimplicitany')) {
|
|
1150
|
+
return getReferencesForIssue(language, 'strict-mode');
|
|
1151
|
+
}
|
|
1152
|
+
if (message.includes('any') || message.includes('implicit any') || message.includes('type safety')) {
|
|
1153
|
+
return getReferencesForIssue(language, 'any-propagation');
|
|
1154
|
+
}
|
|
1155
|
+
if (message.includes('performance') || message.includes('compilation') || message.includes('complexity')) {
|
|
1156
|
+
return getReferencesForIssue(language, 'performance');
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
return [];
|
|
1160
|
+
}
|
|
1161
|
+
//# sourceMappingURL=references.js.map
|