@sun-asterisk/sunlint 1.3.47 → 1.3.49
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/config/rules/rules-registry-generated.json +1717 -282
- package/core/architecture-integration.js +57 -15
- package/core/cli-action-handler.js +51 -36
- package/core/config-manager.js +6 -0
- package/core/config-merger.js +33 -0
- package/core/config-validator.js +37 -2
- package/core/file-targeting-service.js +148 -15
- package/core/init-command.js +118 -70
- package/core/output-service.js +12 -3
- package/core/project-detector.js +517 -0
- package/core/scoring-service.js +12 -6
- package/core/summary-report-service.js +9 -4
- package/core/tui-select.js +245 -0
- package/engines/arch-detect/rules/layered/l001-presentation-layer.js +7 -15
- package/engines/arch-detect/rules/layered/l002-business-layer.js +7 -15
- package/engines/arch-detect/rules/layered/l003-data-layer.js +7 -15
- package/engines/arch-detect/rules/layered/l004-model-layer.js +7 -15
- package/engines/arch-detect/rules/layered/l005-layer-separation.js +22 -2
- package/engines/arch-detect/rules/layered/l006-dependency-direction.js +8 -5
- package/engines/arch-detect/rules/modular/m005-no-deep-imports.js +67 -29
- package/engines/arch-detect/rules/presentation/pr001-view-layer.js +16 -9
- package/engines/arch-detect/rules/presentation/pr006-router-layer.js +33 -8
- package/engines/arch-detect/rules/presentation/pr007-interactor-layer.js +35 -6
- package/engines/arch-detect/rules/project-scanner/ps003-framework-detection.js +56 -10
- package/engines/impact/cli.js +54 -39
- package/engines/impact/config/default-config.js +105 -5
- package/engines/impact/core/impact-analyzer.js +12 -15
- package/engines/impact/core/utils/gitignore-parser.js +123 -0
- package/engines/impact/core/utils/method-call-graph.js +272 -87
- package/origin-rules/dart-en.md +1 -1
- package/origin-rules/go-en.md +231 -0
- package/origin-rules/php-en.md +107 -0
- package/origin-rules/python-en.md +113 -0
- package/origin-rules/ruby-en.md +607 -0
- package/package.json +1 -1
- package/scripts/copy-arch-detect.js +5 -1
- package/scripts/copy-impact-analyzer.js +5 -1
- package/scripts/generate-rules-registry.js +30 -14
- package/skill-assets/sunlint-code-quality/SKILL.md +3 -2
- package/skill-assets/sunlint-code-quality/rules/dart/C006-verb-noun-functions.md +45 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C013-no-dead-code.md +53 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C014-dependency-injection.md +92 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C017-no-constructor-logic.md +62 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C018-generic-errors.md +57 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C019-error-log-level.md +50 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C020-no-unused-imports.md +46 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C022-no-unused-variables.md +50 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C023-no-duplicate-names.md +56 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C024-centralize-constants.md +75 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C029-catch-log-root-cause.md +53 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C030-custom-error-classes.md +86 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C033-separate-data-access.md +90 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C035-error-context-logging.md +62 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C041-no-hardcoded-secrets.md +75 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C042-boolean-naming.md +73 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C052-widget-parsing.md +84 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C060-superclass-logic.md +91 -0
- package/skill-assets/sunlint-code-quality/rules/dart/C067-no-hardcoded-config.md +108 -0
- package/skill-assets/sunlint-code-quality/rules/go/G001-explicit-error-handling.md +53 -0
- package/skill-assets/sunlint-code-quality/rules/go/G002-context-first-argument.md +44 -0
- package/skill-assets/sunlint-code-quality/rules/go/G003-receiver-consistency.md +38 -0
- package/skill-assets/sunlint-code-quality/rules/go/G004-avoid-panic.md +49 -0
- package/skill-assets/sunlint-code-quality/rules/go/G005-goroutine-leak-prevention.md +49 -0
- package/skill-assets/sunlint-code-quality/rules/go/G006-interface-consumer-definition.md +45 -0
- package/skill-assets/sunlint-code-quality/rules/go/GN001-gin-binding-validation.md +57 -0
- package/skill-assets/sunlint-code-quality/rules/go/GN002-gin-error-response.md +48 -0
- package/skill-assets/sunlint-code-quality/rules/go/GN003-graceful-shutdown.md +57 -0
- package/skill-assets/sunlint-code-quality/rules/go/GN004-gin-route-logical-grouping.md +54 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/AGENTS.md +149 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN001-abort-after-response.md +75 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN002-request-context.md +64 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN003-bind-error-handling.md +70 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN004-dependency-injection.md +78 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN005-route-groups-middleware.md +71 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN006-http-status-codes.md +91 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN007-release-mode.md +64 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN008-struct-validation-tags.md +90 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN009-recovery-middleware.md +68 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN010-context-scope.md +68 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN011-middleware-concerns.md +92 -0
- package/skill-assets/sunlint-code-quality/rules/go-gin/GN012-no-log-sensitive.md +84 -0
- package/skill-assets/sunlint-code-quality/rules/java/J001-try-with-resources.md +86 -0
- package/skill-assets/sunlint-code-quality/rules/java/J002-equals-and-hashcode.md +88 -0
- package/skill-assets/sunlint-code-quality/rules/java/J003-string-comparison.md +72 -0
- package/skill-assets/sunlint-code-quality/rules/java/J004-use-java-time.md +91 -0
- package/skill-assets/sunlint-code-quality/rules/java/J005-no-print-stack-trace.md +80 -0
- package/skill-assets/sunlint-code-quality/rules/java/J006-no-system-println.md +89 -0
- package/skill-assets/sunlint-code-quality/rules/java/J007-proper-logger.md +91 -0
- package/skill-assets/sunlint-code-quality/rules/java/J008-thread-safe-singleton.md +119 -0
- package/skill-assets/sunlint-code-quality/rules/java/J009-utility-class-constructor.md +82 -0
- package/skill-assets/sunlint-code-quality/rules/java/J010-preserve-stack-trace.md +119 -0
- package/skill-assets/sunlint-code-quality/rules/java/J011-null-safe-compare.md +88 -0
- package/skill-assets/sunlint-code-quality/rules/java/J012-use-enum-collections.md +104 -0
- package/skill-assets/sunlint-code-quality/rules/java/J013-return-empty-not-null.md +102 -0
- package/skill-assets/sunlint-code-quality/rules/java/J014-hardcoded-crypto-key.md +108 -0
- package/skill-assets/sunlint-code-quality/rules/java/J015-optional-instead-of-null.md +109 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/AGENTS.md +124 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV001-form-request-validation.md +64 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV002-eager-load-no-n-plus-1.md +58 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV003-config-not-env.md +54 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV004-fillable-mass-assignment.md +51 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV005-policies-gates-authorization.md +71 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV006-queue-heavy-tasks.md +68 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV007-hash-passwords.md +51 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV008-route-model-binding.md +67 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV009-api-resources.md +72 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV010-chunk-large-datasets.md +58 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV011-db-transactions.md +73 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV012-service-layer.md +78 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV013-testing-factories.md +75 -0
- package/skill-assets/sunlint-code-quality/rules/php-laravel/LV014-service-container.md +61 -0
- package/skill-assets/sunlint-code-quality/rules/python/P001-mutable-default-argument.md +55 -0
- package/skill-assets/sunlint-code-quality/rules/python/P002-specify-file-encoding.md +45 -0
- package/skill-assets/sunlint-code-quality/rules/python/P003-context-manager-for-resources.md +54 -0
- package/skill-assets/sunlint-code-quality/rules/python/P004-no-bare-except.md +65 -0
- package/skill-assets/sunlint-code-quality/rules/python/P005-use-isinstance.md +60 -0
- package/skill-assets/sunlint-code-quality/rules/python/P006-timezone-aware-datetime.md +58 -0
- package/skill-assets/sunlint-code-quality/rules/python/P007-use-pathlib.md +62 -0
- package/skill-assets/sunlint-code-quality/rules/python/P008-no-wildcard-import.md +52 -0
- package/skill-assets/sunlint-code-quality/rules/python/P009-logging-lazy-format.md +50 -0
- package/skill-assets/sunlint-code-quality/rules/python/P010-exception-chaining.md +57 -0
- package/skill-assets/sunlint-code-quality/rules/python/P011-subprocess-check.md +59 -0
- package/skill-assets/sunlint-code-quality/rules/python/P012-requests-timeout.md +70 -0
- package/skill-assets/sunlint-code-quality/rules/python/P013-no-global-statement.md +73 -0
- package/skill-assets/sunlint-code-quality/rules/python/P014-no-modify-collection-while-iterating.md +66 -0
- package/skill-assets/sunlint-code-quality/rules/python/P015-prefer-fstrings.md +61 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/AGENTS.md +121 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR001-strong-parameters.md +55 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR002-eager-load-includes.md +51 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR003-service-objects.md +99 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR004-active-job-background.md +67 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR005-pagination.md +53 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR006-find-each-batches.md +53 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR007-http-status-codes.md +76 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR008-before-action-auth.md +77 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR009-rails-credentials.md +61 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR010-scopes.md +57 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR011-counter-cache.md +59 -0
- package/skill-assets/sunlint-code-quality/rules/ruby-rails/RR012-render-json-status.md +42 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C006-verb-noun-functions.md +37 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C013-no-dead-code.md +55 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C014-dependency-injection.md +69 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C017-no-constructor-logic.md +66 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C018-generic-errors.md +64 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C019-error-log-level.md +64 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C020-no-unused-imports.md +47 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C022-no-unused-variables.md +46 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C023-no-duplicate-names.md +55 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C024-centralize-constants.md +68 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C029-catch-log-root-cause.md +69 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C030-custom-error-classes.md +77 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C033-separate-data-access.md +89 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C035-error-context-logging.md +66 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C041-no-hardcoded-secrets.md +65 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C042-boolean-naming.md +60 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C052-controller-parsing.md +67 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C060-superclass-logic.md +95 -0
- package/skill-assets/sunlint-code-quality/rules/swift/C067-no-hardcoded-config.md +80 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S003-sql-injection.md +65 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S004-no-log-credentials.md +67 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S005-server-authorization.md +73 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S006-default-credentials.md +76 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S007-output-encoding.md +96 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S009-approved-crypto.md +86 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S010-csprng.md +71 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S011-insecure-deserialization.md +74 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S012-secrets-management.md +81 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S013-tls-connections.md +67 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S017-parameterized-queries.md +86 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S019-session-management.md +131 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S020-kvc-injection.md +91 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S025-input-validation.md +125 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S029-brute-force-protection.md +120 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S036-path-traversal.md +102 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S039-tls-certificate-validation.md +109 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S041-logout-invalidation.md +103 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S043-password-hashing.md +116 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S044-critical-changes-reauth.md +145 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S045-debug-info-exposure.md +116 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S046-unvalidated-redirect.md +140 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S051-token-expiry.md +134 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S053-jwt-validation.md +139 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S059-background-snapshot-protection.md +113 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S060-data-protection-api.md +106 -0
- package/skill-assets/sunlint-code-quality/rules/swift/S061-jailbreak-detection.md +132 -0
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
"D001": {
|
|
1836
1836
|
"name": "Recommended Lint Rules Should Be Enabled",
|
|
1837
1837
|
"description": "Ensure code quality through standard lint configurations",
|
|
1838
|
-
"category": "
|
|
1838
|
+
"category": "Mobile",
|
|
1839
1839
|
"severity": "major",
|
|
1840
1840
|
"languages": [
|
|
1841
1841
|
"dart"
|
|
@@ -1858,7 +1858,7 @@
|
|
|
1858
1858
|
"D002": {
|
|
1859
1859
|
"name": "Always Dispose Resources and Remove Listeners",
|
|
1860
1860
|
"description": "Prevent memory leaks by ensuring proper resource disposal",
|
|
1861
|
-
"category": "
|
|
1861
|
+
"category": "Mobile",
|
|
1862
1862
|
"severity": "major",
|
|
1863
1863
|
"languages": [
|
|
1864
1864
|
"dart"
|
|
@@ -1882,7 +1882,7 @@
|
|
|
1882
1882
|
"D003": {
|
|
1883
1883
|
"name": "Prefer Widgets Over Methods Returning Widgets",
|
|
1884
1884
|
"description": "Improve performance and maintainability by extracting widget-returning methods into widget classes",
|
|
1885
|
-
"category": "
|
|
1885
|
+
"category": "Mobile",
|
|
1886
1886
|
"severity": "major",
|
|
1887
1887
|
"languages": [
|
|
1888
1888
|
"dart"
|
|
@@ -1906,7 +1906,7 @@
|
|
|
1906
1906
|
"D004": {
|
|
1907
1907
|
"name": "Avoid shrinkWrap in ListView",
|
|
1908
1908
|
"description": "Prevent performance issues caused by shrinkWrap in scrollable widgets",
|
|
1909
|
-
"category": "
|
|
1909
|
+
"category": "Mobile",
|
|
1910
1910
|
"severity": "major",
|
|
1911
1911
|
"languages": [
|
|
1912
1912
|
"dart"
|
|
@@ -1930,7 +1930,7 @@
|
|
|
1930
1930
|
"D005": {
|
|
1931
1931
|
"name": "Limit Widget Nesting Depth to 6",
|
|
1932
1932
|
"description": "Maintain code readability and prevent performance issues caused by deeply nested widgets",
|
|
1933
|
-
"category": "
|
|
1933
|
+
"category": "Mobile",
|
|
1934
1934
|
"severity": "major",
|
|
1935
1935
|
"languages": [
|
|
1936
1936
|
"dart"
|
|
@@ -1955,7 +1955,7 @@
|
|
|
1955
1955
|
"D006": {
|
|
1956
1956
|
"name": "Prefer Extracting Large Callbacks from Build",
|
|
1957
1957
|
"description": "Improve code readability and testability by extracting large callback functions",
|
|
1958
|
-
"category": "
|
|
1958
|
+
"category": "Mobile",
|
|
1959
1959
|
"severity": "major",
|
|
1960
1960
|
"languages": [
|
|
1961
1961
|
"dart"
|
|
@@ -1980,7 +1980,7 @@
|
|
|
1980
1980
|
"D007": {
|
|
1981
1981
|
"name": "Prefer Init First, Dispose Last",
|
|
1982
1982
|
"description": "Ensure proper lifecycle method ordering in StatefulWidget",
|
|
1983
|
-
"category": "
|
|
1983
|
+
"category": "Mobile",
|
|
1984
1984
|
"severity": "major",
|
|
1985
1985
|
"languages": [
|
|
1986
1986
|
"dart"
|
|
@@ -2005,7 +2005,7 @@
|
|
|
2005
2005
|
"D008": {
|
|
2006
2006
|
"name": "Avoid Long Functions",
|
|
2007
2007
|
"description": "Improve code readability and maintainability by limiting function length",
|
|
2008
|
-
"category": "
|
|
2008
|
+
"category": "Mobile",
|
|
2009
2009
|
"severity": "major",
|
|
2010
2010
|
"languages": [
|
|
2011
2011
|
"dart"
|
|
@@ -2030,7 +2030,7 @@
|
|
|
2030
2030
|
"D009": {
|
|
2031
2031
|
"name": "Limit Function Parameters",
|
|
2032
2032
|
"description": "Improve code readability by limiting the number of function parameters",
|
|
2033
|
-
"category": "
|
|
2033
|
+
"category": "Mobile",
|
|
2034
2034
|
"severity": "major",
|
|
2035
2035
|
"languages": [
|
|
2036
2036
|
"dart"
|
|
@@ -2055,7 +2055,7 @@
|
|
|
2055
2055
|
"D010": {
|
|
2056
2056
|
"name": "Limit Cyclomatic Complexity",
|
|
2057
2057
|
"description": "Improve code readability and maintainability by limiting cyclomatic complexity",
|
|
2058
|
-
"category": "
|
|
2058
|
+
"category": "Mobile",
|
|
2059
2059
|
"severity": "major",
|
|
2060
2060
|
"languages": [
|
|
2061
2061
|
"dart"
|
|
@@ -2080,7 +2080,7 @@
|
|
|
2080
2080
|
"D011": {
|
|
2081
2081
|
"name": "Prefer Named Parameters",
|
|
2082
2082
|
"description": "Improve code readability and prevent parameter confusion",
|
|
2083
|
-
"category": "
|
|
2083
|
+
"category": "Mobile",
|
|
2084
2084
|
"severity": "major",
|
|
2085
2085
|
"languages": [
|
|
2086
2086
|
"dart"
|
|
@@ -2105,7 +2105,7 @@
|
|
|
2105
2105
|
"D012": {
|
|
2106
2106
|
"name": "Prefer Named Boolean Parameters",
|
|
2107
2107
|
"description": "Improve code readability by avoiding unclear boolean parameters",
|
|
2108
|
-
"category": "
|
|
2108
|
+
"category": "Mobile",
|
|
2109
2109
|
"severity": "major",
|
|
2110
2110
|
"languages": [
|
|
2111
2111
|
"dart"
|
|
@@ -2130,7 +2130,7 @@
|
|
|
2130
2130
|
"D013": {
|
|
2131
2131
|
"name": "Prefer a Single Public Class Per File",
|
|
2132
2132
|
"description": "Improve code organization and maintainability",
|
|
2133
|
-
"category": "
|
|
2133
|
+
"category": "Mobile",
|
|
2134
2134
|
"severity": "major",
|
|
2135
2135
|
"languages": [
|
|
2136
2136
|
"dart"
|
|
@@ -2155,7 +2155,7 @@
|
|
|
2155
2155
|
"D014": {
|
|
2156
2156
|
"name": "Avoid Unsafe Collection Access",
|
|
2157
2157
|
"description": "Prevent runtime errors from accessing empty collections",
|
|
2158
|
-
"category": "
|
|
2158
|
+
"category": "Mobile",
|
|
2159
2159
|
"severity": "major",
|
|
2160
2160
|
"languages": [
|
|
2161
2161
|
"dart"
|
|
@@ -2180,7 +2180,7 @@
|
|
|
2180
2180
|
"D015": {
|
|
2181
2181
|
"name": "Ensure copyWith includes all constructor parameters",
|
|
2182
2182
|
"description": "Maintain data integrity and completeness in immutable objects",
|
|
2183
|
-
"category": "
|
|
2183
|
+
"category": "Mobile",
|
|
2184
2184
|
"severity": "major",
|
|
2185
2185
|
"languages": [
|
|
2186
2186
|
"dart"
|
|
@@ -2205,7 +2205,7 @@
|
|
|
2205
2205
|
"D016": {
|
|
2206
2206
|
"name": "Project should have tests",
|
|
2207
2207
|
"description": "Ensure code quality and prevent regressions through automated testing",
|
|
2208
|
-
"category": "
|
|
2208
|
+
"category": "Mobile",
|
|
2209
2209
|
"severity": "major",
|
|
2210
2210
|
"languages": [
|
|
2211
2211
|
"dart"
|
|
@@ -2230,7 +2230,7 @@
|
|
|
2230
2230
|
"D017": {
|
|
2231
2231
|
"name": "Pubspec dependencies should be reviewed regularly",
|
|
2232
2232
|
"description": "Ensure dependencies are kept up-to-date for security and stability",
|
|
2233
|
-
"category": "
|
|
2233
|
+
"category": "Mobile",
|
|
2234
2234
|
"severity": "major",
|
|
2235
2235
|
"languages": [
|
|
2236
2236
|
"dart"
|
|
@@ -2255,7 +2255,7 @@
|
|
|
2255
2255
|
"D018": {
|
|
2256
2256
|
"name": "Remove Commented-Out Code",
|
|
2257
2257
|
"description": "Keep codebase clean by removing commented-out code",
|
|
2258
|
-
"category": "
|
|
2258
|
+
"category": "Mobile",
|
|
2259
2259
|
"severity": "major",
|
|
2260
2260
|
"languages": [
|
|
2261
2261
|
"dart"
|
|
@@ -2280,7 +2280,7 @@
|
|
|
2280
2280
|
"D019": {
|
|
2281
2281
|
"name": "Avoid Single Child in Multi-Child Widget",
|
|
2282
2282
|
"description": "Use appropriate widget types for the number of children",
|
|
2283
|
-
"category": "
|
|
2283
|
+
"category": "Mobile",
|
|
2284
2284
|
"severity": "major",
|
|
2285
2285
|
"languages": [
|
|
2286
2286
|
"dart"
|
|
@@ -2305,7 +2305,7 @@
|
|
|
2305
2305
|
"D020": {
|
|
2306
2306
|
"name": "Limit If/Else Branches",
|
|
2307
2307
|
"description": "Reduce complexity by limiting the number of if/else branches",
|
|
2308
|
-
"category": "
|
|
2308
|
+
"category": "Mobile",
|
|
2309
2309
|
"severity": "major",
|
|
2310
2310
|
"languages": [
|
|
2311
2311
|
"dart"
|
|
@@ -2330,7 +2330,7 @@
|
|
|
2330
2330
|
"D021": {
|
|
2331
2331
|
"name": "Avoid Negated Boolean Checks",
|
|
2332
2332
|
"description": "Improve code readability by avoiding inverted or negated boolean conditions",
|
|
2333
|
-
"category": "
|
|
2333
|
+
"category": "Mobile",
|
|
2334
2334
|
"severity": "major",
|
|
2335
2335
|
"languages": [
|
|
2336
2336
|
"dart"
|
|
@@ -2354,7 +2354,7 @@
|
|
|
2354
2354
|
"D022": {
|
|
2355
2355
|
"name": "Use setState Correctly",
|
|
2356
2356
|
"description": "Ensure setState is used correctly in StatefulWidget to avoid performance issues and bugs",
|
|
2357
|
-
"category": "
|
|
2357
|
+
"category": "Mobile",
|
|
2358
2358
|
"severity": "major",
|
|
2359
2359
|
"languages": [
|
|
2360
2360
|
"dart"
|
|
@@ -2379,7 +2379,7 @@
|
|
|
2379
2379
|
"D023": {
|
|
2380
2380
|
"name": "Avoid Unnecessary Method Overrides",
|
|
2381
2381
|
"description": "Remove methods that only call super with the same parameters as they add no value",
|
|
2382
|
-
"category": "
|
|
2382
|
+
"category": "Mobile",
|
|
2383
2383
|
"severity": "major",
|
|
2384
2384
|
"languages": [
|
|
2385
2385
|
"dart"
|
|
@@ -2404,7 +2404,7 @@
|
|
|
2404
2404
|
"D024": {
|
|
2405
2405
|
"name": "Avoid Unnecessary StatefulWidget",
|
|
2406
2406
|
"description": "Use StatelessWidget when no state management is needed to improve performance",
|
|
2407
|
-
"category": "
|
|
2407
|
+
"category": "Mobile",
|
|
2408
2408
|
"severity": "major",
|
|
2409
2409
|
"languages": [
|
|
2410
2410
|
"dart"
|
|
@@ -2429,7 +2429,7 @@
|
|
|
2429
2429
|
"D025": {
|
|
2430
2430
|
"name": "Avoid Nested Conditional Expressions",
|
|
2431
2431
|
"description": "Improve code readability by avoiding nested ternary operators",
|
|
2432
|
-
"category": "
|
|
2432
|
+
"category": "Mobile",
|
|
2433
2433
|
"severity": "major",
|
|
2434
2434
|
"languages": [
|
|
2435
2435
|
"dart"
|
|
@@ -2451,10 +2451,228 @@
|
|
|
2451
2451
|
"MAINTAINABILITY"
|
|
2452
2452
|
]
|
|
2453
2453
|
},
|
|
2454
|
+
"G001": {
|
|
2455
|
+
"name": "Explicitly check ALL errors",
|
|
2456
|
+
"description": "Prevent silent failures and ensure robust error recovery.",
|
|
2457
|
+
"category": "Backend",
|
|
2458
|
+
"severity": "critical",
|
|
2459
|
+
"languages": [
|
|
2460
|
+
"golang"
|
|
2461
|
+
],
|
|
2462
|
+
"version": "1.0",
|
|
2463
|
+
"status": "activated",
|
|
2464
|
+
"tags": [
|
|
2465
|
+
"Common",
|
|
2466
|
+
"readability",
|
|
2467
|
+
"code-quality"
|
|
2468
|
+
],
|
|
2469
|
+
"tools": [
|
|
2470
|
+
"errcheck",
|
|
2471
|
+
"golangci-lint"
|
|
2472
|
+
],
|
|
2473
|
+
"framework": "All",
|
|
2474
|
+
"principles": []
|
|
2475
|
+
},
|
|
2476
|
+
"G002": {
|
|
2477
|
+
"name": "Context MUST be the first argument",
|
|
2478
|
+
"description": "Follow Go idiomatic patterns for cancellation and timeouts.",
|
|
2479
|
+
"category": "Backend",
|
|
2480
|
+
"severity": "major",
|
|
2481
|
+
"languages": [
|
|
2482
|
+
"golang"
|
|
2483
|
+
],
|
|
2484
|
+
"version": "1.0",
|
|
2485
|
+
"status": "activated",
|
|
2486
|
+
"tags": [
|
|
2487
|
+
"Common",
|
|
2488
|
+
"readability",
|
|
2489
|
+
"code-quality"
|
|
2490
|
+
],
|
|
2491
|
+
"tools": [
|
|
2492
|
+
"golangci-lint",
|
|
2493
|
+
"contextcheck"
|
|
2494
|
+
],
|
|
2495
|
+
"framework": "All",
|
|
2496
|
+
"principles": []
|
|
2497
|
+
},
|
|
2498
|
+
"G003": {
|
|
2499
|
+
"name": "Consistent Receiver Naming",
|
|
2500
|
+
"description": "Improve readability and consistency across methods.",
|
|
2501
|
+
"category": "Backend",
|
|
2502
|
+
"severity": "minor",
|
|
2503
|
+
"languages": [
|
|
2504
|
+
"golang"
|
|
2505
|
+
],
|
|
2506
|
+
"version": "1.0",
|
|
2507
|
+
"status": "activated",
|
|
2508
|
+
"tags": [
|
|
2509
|
+
"Common",
|
|
2510
|
+
"readability",
|
|
2511
|
+
"code-quality"
|
|
2512
|
+
],
|
|
2513
|
+
"tools": [
|
|
2514
|
+
"golangci-lint",
|
|
2515
|
+
"stylecheck"
|
|
2516
|
+
],
|
|
2517
|
+
"framework": "All",
|
|
2518
|
+
"principles": []
|
|
2519
|
+
},
|
|
2520
|
+
"G004": {
|
|
2521
|
+
"name": "No panic() in production business logic",
|
|
2522
|
+
"description": "Prevent application crashes and enable graceful recovery.",
|
|
2523
|
+
"category": "Backend",
|
|
2524
|
+
"severity": "critical",
|
|
2525
|
+
"languages": [
|
|
2526
|
+
"golang"
|
|
2527
|
+
],
|
|
2528
|
+
"version": "1.0",
|
|
2529
|
+
"status": "activated",
|
|
2530
|
+
"tags": [
|
|
2531
|
+
"Common",
|
|
2532
|
+
"readability",
|
|
2533
|
+
"code-quality"
|
|
2534
|
+
],
|
|
2535
|
+
"tools": [
|
|
2536
|
+
"golangci-lint",
|
|
2537
|
+
"staticcheck"
|
|
2538
|
+
],
|
|
2539
|
+
"framework": "All",
|
|
2540
|
+
"principles": []
|
|
2541
|
+
},
|
|
2542
|
+
"G005": {
|
|
2543
|
+
"name": "Goroutine Leak Prevention",
|
|
2544
|
+
"description": "Prevent memory exhaustion and zombie processes.",
|
|
2545
|
+
"category": "Backend",
|
|
2546
|
+
"severity": "major",
|
|
2547
|
+
"languages": [
|
|
2548
|
+
"golang"
|
|
2549
|
+
],
|
|
2550
|
+
"version": "1.0",
|
|
2551
|
+
"status": "activated",
|
|
2552
|
+
"tags": [
|
|
2553
|
+
"Common",
|
|
2554
|
+
"readability",
|
|
2555
|
+
"code-quality"
|
|
2556
|
+
],
|
|
2557
|
+
"tools": [
|
|
2558
|
+
"goleak",
|
|
2559
|
+
"golangci-lint"
|
|
2560
|
+
],
|
|
2561
|
+
"framework": "All",
|
|
2562
|
+
"principles": []
|
|
2563
|
+
},
|
|
2564
|
+
"G006": {
|
|
2565
|
+
"name": "Define interfaces at consumer side",
|
|
2566
|
+
"description": "Promote decoupling and simplify testing.",
|
|
2567
|
+
"category": "Backend",
|
|
2568
|
+
"severity": "major",
|
|
2569
|
+
"languages": [
|
|
2570
|
+
"golang"
|
|
2571
|
+
],
|
|
2572
|
+
"version": "1.0",
|
|
2573
|
+
"status": "activated",
|
|
2574
|
+
"tags": [
|
|
2575
|
+
"Common",
|
|
2576
|
+
"readability",
|
|
2577
|
+
"code-quality"
|
|
2578
|
+
],
|
|
2579
|
+
"tools": [
|
|
2580
|
+
"Manual Review",
|
|
2581
|
+
"Architecture rules"
|
|
2582
|
+
],
|
|
2583
|
+
"framework": "All",
|
|
2584
|
+
"principles": []
|
|
2585
|
+
},
|
|
2586
|
+
"GN001": {
|
|
2587
|
+
"name": "Use Gin binding for validation",
|
|
2588
|
+
"description": "Simplify input handling and ensure consistent validation.",
|
|
2589
|
+
"category": "Backend",
|
|
2590
|
+
"severity": "major",
|
|
2591
|
+
"languages": [
|
|
2592
|
+
"golang, Gin"
|
|
2593
|
+
],
|
|
2594
|
+
"version": "1.0",
|
|
2595
|
+
"status": "activated",
|
|
2596
|
+
"tags": [
|
|
2597
|
+
"Common",
|
|
2598
|
+
"readability",
|
|
2599
|
+
"code-quality"
|
|
2600
|
+
],
|
|
2601
|
+
"tools": [
|
|
2602
|
+
"Gin",
|
|
2603
|
+
"validator"
|
|
2604
|
+
],
|
|
2605
|
+
"framework": "All",
|
|
2606
|
+
"principles": []
|
|
2607
|
+
},
|
|
2608
|
+
"GN002": {
|
|
2609
|
+
"name": "Abort with status for fatal errors",
|
|
2610
|
+
"description": "Ensure middleware chain is interrupted and consistent response is sent.",
|
|
2611
|
+
"category": "Backend",
|
|
2612
|
+
"severity": "major",
|
|
2613
|
+
"languages": [
|
|
2614
|
+
"golang, Gin"
|
|
2615
|
+
],
|
|
2616
|
+
"version": "1.0",
|
|
2617
|
+
"status": "activated",
|
|
2618
|
+
"tags": [
|
|
2619
|
+
"Common",
|
|
2620
|
+
"readability",
|
|
2621
|
+
"code-quality"
|
|
2622
|
+
],
|
|
2623
|
+
"tools": [
|
|
2624
|
+
"Gin"
|
|
2625
|
+
],
|
|
2626
|
+
"framework": "All",
|
|
2627
|
+
"principles": []
|
|
2628
|
+
},
|
|
2629
|
+
"GN003": {
|
|
2630
|
+
"name": "Implement Graceful Shutdown",
|
|
2631
|
+
"description": "Prevent data loss and ensure clean connection handling.",
|
|
2632
|
+
"category": "Backend",
|
|
2633
|
+
"severity": "major",
|
|
2634
|
+
"languages": [
|
|
2635
|
+
"golang, Gin"
|
|
2636
|
+
],
|
|
2637
|
+
"version": "1.0",
|
|
2638
|
+
"status": "activated",
|
|
2639
|
+
"tags": [
|
|
2640
|
+
"Common",
|
|
2641
|
+
"readability",
|
|
2642
|
+
"code-quality"
|
|
2643
|
+
],
|
|
2644
|
+
"tools": [
|
|
2645
|
+
"Go Standard Library",
|
|
2646
|
+
"Gin"
|
|
2647
|
+
],
|
|
2648
|
+
"framework": "All",
|
|
2649
|
+
"principles": []
|
|
2650
|
+
},
|
|
2651
|
+
"GN004": {
|
|
2652
|
+
"name": "Logical Route Grouping",
|
|
2653
|
+
"description": "Improve code organization and shared middleware management.",
|
|
2654
|
+
"category": "Backend",
|
|
2655
|
+
"severity": "major",
|
|
2656
|
+
"languages": [
|
|
2657
|
+
"golang, Gin"
|
|
2658
|
+
],
|
|
2659
|
+
"version": "1.0",
|
|
2660
|
+
"status": "activated",
|
|
2661
|
+
"tags": [
|
|
2662
|
+
"Common",
|
|
2663
|
+
"readability",
|
|
2664
|
+
"code-quality"
|
|
2665
|
+
],
|
|
2666
|
+
"tools": [
|
|
2667
|
+
"Gin"
|
|
2668
|
+
],
|
|
2669
|
+
"framework": "All",
|
|
2670
|
+
"principles": []
|
|
2671
|
+
},
|
|
2454
2672
|
"J001": {
|
|
2455
2673
|
"name": "Use Null Object or Optional instead of repetitive null checks",
|
|
2456
2674
|
"description": "Reduce the risk of NullPointerException (NPE) and avoid repeating `if (x != null)` throughout the code.",
|
|
2457
|
-
"category": "
|
|
2675
|
+
"category": "Backend",
|
|
2458
2676
|
"severity": "major",
|
|
2459
2677
|
"languages": [
|
|
2460
2678
|
"java"
|
|
@@ -2478,7 +2696,7 @@
|
|
|
2478
2696
|
"J002": {
|
|
2479
2697
|
"name": "Do not use `null` as a default value unless absolutely necessary",
|
|
2480
2698
|
"description": "Prevent NullPointerException by promoting clearer use of Optional or nullable types.",
|
|
2481
|
-
"category": "
|
|
2699
|
+
"category": "Backend",
|
|
2482
2700
|
"severity": "major",
|
|
2483
2701
|
"languages": [
|
|
2484
2702
|
"java"
|
|
@@ -2501,7 +2719,7 @@
|
|
|
2501
2719
|
"J003": {
|
|
2502
2720
|
"name": "Every enum must provide a clear toString or description when used in UI/logs",
|
|
2503
2721
|
"description": "Avoid unclear log messages such as `STATUS_1`, and improve readability.",
|
|
2504
|
-
"category": "
|
|
2722
|
+
"category": "Backend",
|
|
2505
2723
|
"severity": "major",
|
|
2506
2724
|
"languages": [
|
|
2507
2725
|
"java"
|
|
@@ -2525,7 +2743,7 @@
|
|
|
2525
2743
|
"J004": {
|
|
2526
2744
|
"name": "Avoid creating enums/classes just to wrap fixed constants",
|
|
2527
2745
|
"description": "Prevent unnecessary abstractions that clutter the codebase.",
|
|
2528
|
-
"category": "
|
|
2746
|
+
"category": "Backend",
|
|
2529
2747
|
"severity": "major",
|
|
2530
2748
|
"languages": [
|
|
2531
2749
|
"java"
|
|
@@ -2548,7 +2766,7 @@
|
|
|
2548
2766
|
"J005": {
|
|
2549
2767
|
"name": "Always use `final` or `const` for variables that do not change",
|
|
2550
2768
|
"description": "Clearly express intent and prevent unintended modifications.",
|
|
2551
|
-
"category": "
|
|
2769
|
+
"category": "Backend",
|
|
2552
2770
|
"severity": "major",
|
|
2553
2771
|
"languages": [
|
|
2554
2772
|
"java"
|
|
@@ -2572,7 +2790,7 @@
|
|
|
2572
2790
|
"J006": {
|
|
2573
2791
|
"name": "Do not override methods without calling `super` when required",
|
|
2574
2792
|
"description": "Preserve expected behavior and side effects in inherited logic.",
|
|
2575
|
-
"category": "
|
|
2793
|
+
"category": "Backend",
|
|
2576
2794
|
"severity": "major",
|
|
2577
2795
|
"languages": [
|
|
2578
2796
|
"java"
|
|
@@ -2596,7 +2814,7 @@
|
|
|
2596
2814
|
"K001": {
|
|
2597
2815
|
"name": "Use Named Arguments when functions have more than 3 parameters",
|
|
2598
2816
|
"description": "Improve readability, avoid errors from parameter order confusion, and make function calls clearer.",
|
|
2599
|
-
"category": "
|
|
2817
|
+
"category": "Mobile",
|
|
2600
2818
|
"severity": "major",
|
|
2601
2819
|
"languages": [
|
|
2602
2820
|
"kotlin"
|
|
@@ -2619,7 +2837,7 @@
|
|
|
2619
2837
|
"K002": {
|
|
2620
2838
|
"name": "Limit function complexity (Cyclomatic Complexity)",
|
|
2621
2839
|
"description": "Reduce logic complexity and branching to improve readability, testability, and maintainability.",
|
|
2622
|
-
"category": "
|
|
2840
|
+
"category": "Mobile",
|
|
2623
2841
|
"severity": "critical",
|
|
2624
2842
|
"languages": [
|
|
2625
2843
|
"kotlin"
|
|
@@ -2645,7 +2863,7 @@
|
|
|
2645
2863
|
"K003": {
|
|
2646
2864
|
"name": "Avoid overly complex conditions",
|
|
2647
2865
|
"description": "Write clear, readable conditions that are easy to control and understand.",
|
|
2648
|
-
"category": "
|
|
2866
|
+
"category": "Mobile",
|
|
2649
2867
|
"severity": "critical",
|
|
2650
2868
|
"languages": [
|
|
2651
2869
|
"kotlin"
|
|
@@ -2670,7 +2888,7 @@
|
|
|
2670
2888
|
"K004": {
|
|
2671
2889
|
"name": "Avoid nesting code more than 4 levels deep in functions",
|
|
2672
2890
|
"description": "Simplify logic to improve testability and maintainability.",
|
|
2673
|
-
"category": "
|
|
2891
|
+
"category": "Mobile",
|
|
2674
2892
|
"severity": "critical",
|
|
2675
2893
|
"languages": [
|
|
2676
2894
|
"kotlin"
|
|
@@ -2693,7 +2911,7 @@
|
|
|
2693
2911
|
"K005": {
|
|
2694
2912
|
"name": "Do not use `GlobalScope`",
|
|
2695
2913
|
"description": "Avoid coroutines that exist beyond their intended lifecycle.",
|
|
2696
|
-
"category": "
|
|
2914
|
+
"category": "Mobile",
|
|
2697
2915
|
"severity": "critical",
|
|
2698
2916
|
"languages": [
|
|
2699
2917
|
"kotlin"
|
|
@@ -2716,7 +2934,7 @@
|
|
|
2716
2934
|
"K006": {
|
|
2717
2935
|
"name": "Avoid using `suspend` when not necessary",
|
|
2718
2936
|
"description": "Avoid creating the misconception that a function contains asynchronous logic when it actually doesn't need it.",
|
|
2719
|
-
"category": "
|
|
2937
|
+
"category": "Mobile",
|
|
2720
2938
|
"severity": "major",
|
|
2721
2939
|
"languages": [
|
|
2722
2940
|
"kotlin"
|
|
@@ -2740,7 +2958,7 @@
|
|
|
2740
2958
|
"K007": {
|
|
2741
2959
|
"name": "Use `delay()` instead of `sleep()` in coroutines",
|
|
2742
2960
|
"description": "Optimize concurrency, avoid unnecessarily blocking threads.",
|
|
2743
|
-
"category": "
|
|
2961
|
+
"category": "Mobile",
|
|
2744
2962
|
"severity": "critical",
|
|
2745
2963
|
"languages": [
|
|
2746
2964
|
"kotlin"
|
|
@@ -2764,7 +2982,7 @@
|
|
|
2764
2982
|
"K008": {
|
|
2765
2983
|
"name": "Do not swallow `CancellationException` in coroutines",
|
|
2766
2984
|
"description": "Ensure coroutine cancellation is properly propagated to avoid leaks or logic errors.",
|
|
2767
|
-
"category": "
|
|
2985
|
+
"category": "Mobile",
|
|
2768
2986
|
"severity": "major",
|
|
2769
2987
|
"languages": [
|
|
2770
2988
|
"kotlin"
|
|
@@ -2788,7 +3006,7 @@
|
|
|
2788
3006
|
"K009": {
|
|
2789
3007
|
"name": "Do not use `suspend` for functions returning `Flow`",
|
|
2790
3008
|
"description": "Avoid unnecessary asynchronous declarations, keep code clean.",
|
|
2791
|
-
"category": "
|
|
3009
|
+
"category": "Mobile",
|
|
2792
3010
|
"severity": "critical",
|
|
2793
3011
|
"languages": [
|
|
2794
3012
|
"kotlin"
|
|
@@ -2812,7 +3030,7 @@
|
|
|
2812
3030
|
"K010": {
|
|
2813
3031
|
"name": "Do not check/cast exceptions in `catch` blocks",
|
|
2814
3032
|
"description": "Handle errors clearly, readably, and with the correct error type.",
|
|
2815
|
-
"category": "
|
|
3033
|
+
"category": "Mobile",
|
|
2816
3034
|
"severity": "major",
|
|
2817
3035
|
"languages": [
|
|
2818
3036
|
"kotlin"
|
|
@@ -2835,7 +3053,7 @@
|
|
|
2835
3053
|
"K011": {
|
|
2836
3054
|
"name": "Use `class` instead of `object` when extending `Throwable`",
|
|
2837
3055
|
"description": "Avoid using global singletons for exceptions, ensure exceptions carry separate information.",
|
|
2838
|
-
"category": "
|
|
3056
|
+
"category": "Mobile",
|
|
2839
3057
|
"severity": "major",
|
|
2840
3058
|
"languages": [
|
|
2841
3059
|
"kotlin"
|
|
@@ -2858,7 +3076,7 @@
|
|
|
2858
3076
|
"K012": {
|
|
2859
3077
|
"name": "Do not `return` or `throw` in `finally`",
|
|
2860
3078
|
"description": "Do not lose main logic when handling errors, avoid overriding original exceptions.",
|
|
2861
|
-
"category": "
|
|
3079
|
+
"category": "Mobile",
|
|
2862
3080
|
"severity": "critical",
|
|
2863
3081
|
"languages": [
|
|
2864
3082
|
"kotlin"
|
|
@@ -2882,7 +3100,7 @@
|
|
|
2882
3100
|
"K013": {
|
|
2883
3101
|
"name": "Do not wrap and rethrow the same exception type",
|
|
2884
3102
|
"description": "Preserve the original error cause and stack trace.",
|
|
2885
|
-
"category": "
|
|
3103
|
+
"category": "Mobile",
|
|
2886
3104
|
"severity": "major",
|
|
2887
3105
|
"languages": [
|
|
2888
3106
|
"kotlin"
|
|
@@ -2905,7 +3123,7 @@
|
|
|
2905
3123
|
"K014": {
|
|
2906
3124
|
"name": "Use `ArrayPrimitive` instead of `Array<Primitive>`",
|
|
2907
3125
|
"description": "Improve performance, avoid unnecessary boxing/unboxing.",
|
|
2908
|
-
"category": "
|
|
3126
|
+
"category": "Mobile",
|
|
2909
3127
|
"severity": "major",
|
|
2910
3128
|
"languages": [
|
|
2911
3129
|
"kotlin"
|
|
@@ -2928,7 +3146,7 @@
|
|
|
2928
3146
|
"K015": {
|
|
2929
3147
|
"name": "Use `for` instead of `forEach` on ranges",
|
|
2930
3148
|
"description": "Avoid creating unnecessary lambdas, improve runtime performance.",
|
|
2931
|
-
"category": "
|
|
3149
|
+
"category": "Mobile",
|
|
2932
3150
|
"severity": "major",
|
|
2933
3151
|
"languages": [
|
|
2934
3152
|
"kotlin"
|
|
@@ -2951,7 +3169,7 @@
|
|
|
2951
3169
|
"K016": {
|
|
2952
3170
|
"name": "Do not use `else` in `when` with `enum` or `sealed` classes",
|
|
2953
3171
|
"description": "Ensure all cases are handled explicitly and are easy to control.",
|
|
2954
|
-
"category": "
|
|
3172
|
+
"category": "Mobile",
|
|
2955
3173
|
"severity": "major",
|
|
2956
3174
|
"languages": [
|
|
2957
3175
|
"kotlin"
|
|
@@ -2974,7 +3192,7 @@
|
|
|
2974
3192
|
"K017": {
|
|
2975
3193
|
"name": "Do not directly call Garbage Collector (GC)",
|
|
2976
3194
|
"description": "Avoid poor performance or unpredictable behavior.",
|
|
2977
|
-
"category": "
|
|
3195
|
+
"category": "Mobile",
|
|
2978
3196
|
"severity": "critical",
|
|
2979
3197
|
"languages": [
|
|
2980
3198
|
"kotlin"
|
|
@@ -2998,7 +3216,7 @@
|
|
|
2998
3216
|
"K018": {
|
|
2999
3217
|
"name": "Do not ignore function return values",
|
|
3000
3218
|
"description": "Avoid losing useful information, handle function results properly.",
|
|
3001
|
-
"category": "
|
|
3219
|
+
"category": "Mobile",
|
|
3002
3220
|
"severity": "major",
|
|
3003
3221
|
"languages": [
|
|
3004
3222
|
"kotlin"
|
|
@@ -3021,7 +3239,7 @@
|
|
|
3021
3239
|
"K019": {
|
|
3022
3240
|
"name": "Avoid using not-null assertion (!!) to get values from Map",
|
|
3023
3241
|
"description": "Avoid `NullPointerException` when accessing Map.",
|
|
3024
|
-
"category": "
|
|
3242
|
+
"category": "Mobile",
|
|
3025
3243
|
"severity": "major",
|
|
3026
3244
|
"languages": [
|
|
3027
3245
|
"kotlin"
|
|
@@ -3044,7 +3262,7 @@
|
|
|
3044
3262
|
"K020": {
|
|
3045
3263
|
"name": "Do not call `toString()` on nullable objects",
|
|
3046
3264
|
"description": "Avoid displaying unwanted `\"null\"` strings.",
|
|
3047
|
-
"category": "
|
|
3265
|
+
"category": "Mobile",
|
|
3048
3266
|
"severity": "major",
|
|
3049
3267
|
"languages": [
|
|
3050
3268
|
"kotlin"
|
|
@@ -3067,7 +3285,7 @@
|
|
|
3067
3285
|
"K021": {
|
|
3068
3286
|
"name": "Avoid unreachable catch blocks",
|
|
3069
3287
|
"description": "Remove redundant logic and unreachable code.",
|
|
3070
|
-
"category": "
|
|
3288
|
+
"category": "Mobile",
|
|
3071
3289
|
"severity": "major",
|
|
3072
3290
|
"languages": [
|
|
3073
3291
|
"kotlin"
|
|
@@ -3090,7 +3308,7 @@
|
|
|
3090
3308
|
"K022": {
|
|
3091
3309
|
"name": "Avoid unsafe casting",
|
|
3092
3310
|
"description": "Avoid `ClassCastException` and unnecessary runtime errors.",
|
|
3093
|
-
"category": "
|
|
3311
|
+
"category": "Mobile",
|
|
3094
3312
|
"severity": "major",
|
|
3095
3313
|
"languages": [
|
|
3096
3314
|
"kotlin"
|
|
@@ -3114,7 +3332,7 @@
|
|
|
3114
3332
|
"K023": {
|
|
3115
3333
|
"name": "Do not use properties before declaration",
|
|
3116
3334
|
"description": "Avoid logic errors from using uninitialized variables.",
|
|
3117
|
-
"category": "
|
|
3335
|
+
"category": "Mobile",
|
|
3118
3336
|
"severity": "major",
|
|
3119
3337
|
"languages": [
|
|
3120
3338
|
"kotlin"
|
|
@@ -3137,7 +3355,7 @@
|
|
|
3137
3355
|
"K024": {
|
|
3138
3356
|
"name": "Ensure proper modifier order",
|
|
3139
3357
|
"description": "Improve consistency and readability in the codebase.",
|
|
3140
|
-
"category": "
|
|
3358
|
+
"category": "Mobile",
|
|
3141
3359
|
"severity": "major",
|
|
3142
3360
|
"languages": [
|
|
3143
3361
|
"kotlin"
|
|
@@ -3160,7 +3378,7 @@
|
|
|
3160
3378
|
"K025": {
|
|
3161
3379
|
"name": "Ensure proper parameter order in Composable functions",
|
|
3162
3380
|
"description": "Ensure usability, memorability, and extensibility of Composable APIs.",
|
|
3163
|
-
"category": "
|
|
3381
|
+
"category": "Mobile",
|
|
3164
3382
|
"severity": "major",
|
|
3165
3383
|
"languages": [
|
|
3166
3384
|
"kotlin"
|
|
@@ -3184,7 +3402,7 @@
|
|
|
3184
3402
|
"K026": {
|
|
3185
3403
|
"name": "Each component should serve a single purpose",
|
|
3186
3404
|
"description": "Ensure components are easy to maintain, understand, and test.",
|
|
3187
|
-
"category": "
|
|
3405
|
+
"category": "Mobile",
|
|
3188
3406
|
"severity": "major",
|
|
3189
3407
|
"languages": [
|
|
3190
3408
|
"kotlin"
|
|
@@ -3209,7 +3427,7 @@
|
|
|
3209
3427
|
"K027": {
|
|
3210
3428
|
"name": "Composables returning Unit should use PascalCase and be nouns",
|
|
3211
3429
|
"description": "Follow naming conventions for Composables in Compose.",
|
|
3212
|
-
"category": "
|
|
3430
|
+
"category": "Mobile",
|
|
3213
3431
|
"severity": "major",
|
|
3214
3432
|
"languages": [
|
|
3215
3433
|
"kotlin"
|
|
@@ -3233,7 +3451,7 @@
|
|
|
3233
3451
|
"K028": {
|
|
3234
3452
|
"name": "`@Composable` factory functions that return values should use camelCase",
|
|
3235
3453
|
"description": "Follow standard Kotlin function naming conventions.",
|
|
3236
|
-
"category": "
|
|
3454
|
+
"category": "Mobile",
|
|
3237
3455
|
"severity": "major",
|
|
3238
3456
|
"languages": [
|
|
3239
3457
|
"kotlin"
|
|
@@ -3257,7 +3475,7 @@
|
|
|
3257
3475
|
"K029": {
|
|
3258
3476
|
"name": "Prefer Stateless `@Composable` functions",
|
|
3259
3477
|
"description": "Increase reusability, reduce complexity and side effects.",
|
|
3260
|
-
"category": "
|
|
3478
|
+
"category": "Mobile",
|
|
3261
3479
|
"severity": "major",
|
|
3262
3480
|
"languages": [
|
|
3263
3481
|
"kotlin"
|
|
@@ -3281,7 +3499,7 @@
|
|
|
3281
3499
|
"K030": {
|
|
3282
3500
|
"name": "Enhance extensibility by declaring state using interfaces",
|
|
3283
3501
|
"description": "Improve extensibility, reduce coupling with specific implementations.",
|
|
3284
|
-
"category": "
|
|
3502
|
+
"category": "Mobile",
|
|
3285
3503
|
"severity": "major",
|
|
3286
3504
|
"languages": [
|
|
3287
3505
|
"kotlin"
|
|
@@ -3304,7 +3522,7 @@
|
|
|
3304
3522
|
"K031": {
|
|
3305
3523
|
"name": "Create different components instead of multiple style classes",
|
|
3306
3524
|
"description": "Increase maintainability and reusability.",
|
|
3307
|
-
"category": "
|
|
3525
|
+
"category": "Mobile",
|
|
3308
3526
|
"severity": "major",
|
|
3309
3527
|
"languages": [
|
|
3310
3528
|
"kotlin"
|
|
@@ -3327,7 +3545,7 @@
|
|
|
3327
3545
|
"K032": {
|
|
3328
3546
|
"name": "Don't use `null` as default for nullable parameters",
|
|
3329
3547
|
"description": "Avoid misleading default logic.",
|
|
3330
|
-
"category": "
|
|
3548
|
+
"category": "Mobile",
|
|
3331
3549
|
"severity": "major",
|
|
3332
3550
|
"languages": [
|
|
3333
3551
|
"kotlin"
|
|
@@ -3352,7 +3570,7 @@
|
|
|
3352
3570
|
"K033": {
|
|
3353
3571
|
"name": "Don't pass `MutableState<T>` to `@Composable`",
|
|
3354
3572
|
"description": "Prevent unclear state ownership sharing.",
|
|
3355
|
-
"category": "
|
|
3573
|
+
"category": "Mobile",
|
|
3356
3574
|
"severity": "critical",
|
|
3357
3575
|
"languages": [
|
|
3358
3576
|
"kotlin"
|
|
@@ -3369,20 +3587,1242 @@
|
|
|
3369
3587
|
"Code Review"
|
|
3370
3588
|
],
|
|
3371
3589
|
"framework": "All",
|
|
3372
|
-
"principles": [
|
|
3373
|
-
"CODE_QUALITY",
|
|
3374
|
-
"DESIGN_PATTERNS"
|
|
3375
|
-
]
|
|
3590
|
+
"principles": [
|
|
3591
|
+
"CODE_QUALITY",
|
|
3592
|
+
"DESIGN_PATTERNS"
|
|
3593
|
+
]
|
|
3594
|
+
},
|
|
3595
|
+
"K034": {
|
|
3596
|
+
"name": "Prefer `Slot` parameters for extensibility",
|
|
3597
|
+
"description": "Allow users to customize content flexibly.",
|
|
3598
|
+
"category": "Mobile",
|
|
3599
|
+
"severity": "major",
|
|
3600
|
+
"languages": [
|
|
3601
|
+
"kotlin"
|
|
3602
|
+
],
|
|
3603
|
+
"version": "1.0",
|
|
3604
|
+
"status": "activated",
|
|
3605
|
+
"tags": [
|
|
3606
|
+
"Common",
|
|
3607
|
+
"readability",
|
|
3608
|
+
"code-quality"
|
|
3609
|
+
],
|
|
3610
|
+
"tools": [
|
|
3611
|
+
"Custom rule",
|
|
3612
|
+
"Code Review"
|
|
3613
|
+
],
|
|
3614
|
+
"framework": "All",
|
|
3615
|
+
"principles": [
|
|
3616
|
+
"CODE_QUALITY"
|
|
3617
|
+
]
|
|
3618
|
+
},
|
|
3619
|
+
"P001": {
|
|
3620
|
+
"name": "Follow PSR-12 Coding Standard",
|
|
3621
|
+
"description": "Maintain consistent code formatting across all PHP projects.",
|
|
3622
|
+
"category": "Backend",
|
|
3623
|
+
"severity": "major",
|
|
3624
|
+
"languages": [
|
|
3625
|
+
"php"
|
|
3626
|
+
],
|
|
3627
|
+
"version": "1.0",
|
|
3628
|
+
"status": "activated",
|
|
3629
|
+
"tags": [
|
|
3630
|
+
"Common",
|
|
3631
|
+
"readability",
|
|
3632
|
+
"code-quality"
|
|
3633
|
+
],
|
|
3634
|
+
"tools": [
|
|
3635
|
+
"PHP_CodeSniffer",
|
|
3636
|
+
"Laravel Pint"
|
|
3637
|
+
],
|
|
3638
|
+
"framework": "All",
|
|
3639
|
+
"principles": []
|
|
3640
|
+
},
|
|
3641
|
+
"P002": {
|
|
3642
|
+
"name": "Skinny Controllers, Fat Models/Services",
|
|
3643
|
+
"description": "Maintain clear separation of concerns and keep controllers easy to read.",
|
|
3644
|
+
"category": "Backend",
|
|
3645
|
+
"severity": "major",
|
|
3646
|
+
"languages": [
|
|
3647
|
+
"php"
|
|
3648
|
+
],
|
|
3649
|
+
"version": "1.0",
|
|
3650
|
+
"status": "activated",
|
|
3651
|
+
"tags": [
|
|
3652
|
+
"Common",
|
|
3653
|
+
"readability",
|
|
3654
|
+
"code-quality"
|
|
3655
|
+
],
|
|
3656
|
+
"tools": [
|
|
3657
|
+
"Manual Review",
|
|
3658
|
+
"Architecture Rules"
|
|
3659
|
+
],
|
|
3660
|
+
"framework": "All",
|
|
3661
|
+
"principles": []
|
|
3662
|
+
},
|
|
3663
|
+
"P003": {
|
|
3664
|
+
"name": "Use Eloquent over Raw SQL/Query Builder",
|
|
3665
|
+
"description": "Improve code readability and leverage Laravel's built-in security features.",
|
|
3666
|
+
"category": "Backend",
|
|
3667
|
+
"severity": "major",
|
|
3668
|
+
"languages": [
|
|
3669
|
+
"php"
|
|
3670
|
+
],
|
|
3671
|
+
"version": "1.0",
|
|
3672
|
+
"status": "activated",
|
|
3673
|
+
"tags": [
|
|
3674
|
+
"Common",
|
|
3675
|
+
"readability",
|
|
3676
|
+
"code-quality"
|
|
3677
|
+
],
|
|
3678
|
+
"tools": [
|
|
3679
|
+
"Manual Review"
|
|
3680
|
+
],
|
|
3681
|
+
"framework": "All",
|
|
3682
|
+
"principles": []
|
|
3683
|
+
},
|
|
3684
|
+
"P004": {
|
|
3685
|
+
"name": "Form Requests for Validation",
|
|
3686
|
+
"description": "Separate validation logic from business logic.",
|
|
3687
|
+
"category": "Backend",
|
|
3688
|
+
"severity": "major",
|
|
3689
|
+
"languages": [
|
|
3690
|
+
"php"
|
|
3691
|
+
],
|
|
3692
|
+
"version": "1.0",
|
|
3693
|
+
"status": "activated",
|
|
3694
|
+
"tags": [
|
|
3695
|
+
"Common",
|
|
3696
|
+
"readability",
|
|
3697
|
+
"code-quality"
|
|
3698
|
+
],
|
|
3699
|
+
"tools": [
|
|
3700
|
+
"Manual Review",
|
|
3701
|
+
"PHPStan"
|
|
3702
|
+
],
|
|
3703
|
+
"framework": "All",
|
|
3704
|
+
"principles": []
|
|
3705
|
+
},
|
|
3706
|
+
"P005": {
|
|
3707
|
+
"name": "Typed Properties and Return Types",
|
|
3708
|
+
"description": "Increase code reliability and allow static analysis to catch errors.",
|
|
3709
|
+
"category": "Backend",
|
|
3710
|
+
"severity": "major",
|
|
3711
|
+
"languages": [
|
|
3712
|
+
"php"
|
|
3713
|
+
],
|
|
3714
|
+
"version": "1.0",
|
|
3715
|
+
"status": "activated",
|
|
3716
|
+
"tags": [
|
|
3717
|
+
"Common",
|
|
3718
|
+
"readability",
|
|
3719
|
+
"code-quality"
|
|
3720
|
+
],
|
|
3721
|
+
"tools": [
|
|
3722
|
+
"PHPStan",
|
|
3723
|
+
"Psalm"
|
|
3724
|
+
],
|
|
3725
|
+
"framework": "All",
|
|
3726
|
+
"principles": []
|
|
3727
|
+
},
|
|
3728
|
+
"P006": {
|
|
3729
|
+
"name": "Prevent N+1 with Eager Loading",
|
|
3730
|
+
"description": "Optimize performance by reducing the number of database queries.",
|
|
3731
|
+
"category": "Backend",
|
|
3732
|
+
"severity": "critical",
|
|
3733
|
+
"languages": [
|
|
3734
|
+
"php"
|
|
3735
|
+
],
|
|
3736
|
+
"version": "1.0",
|
|
3737
|
+
"status": "activated",
|
|
3738
|
+
"tags": [
|
|
3739
|
+
"Common",
|
|
3740
|
+
"readability",
|
|
3741
|
+
"code-quality"
|
|
3742
|
+
],
|
|
3743
|
+
"tools": [
|
|
3744
|
+
"Laravel Telescope",
|
|
3745
|
+
"Clockwork",
|
|
3746
|
+
"laravel-query-detector"
|
|
3747
|
+
],
|
|
3748
|
+
"framework": "All",
|
|
3749
|
+
"principles": []
|
|
3750
|
+
},
|
|
3751
|
+
"PY001": {
|
|
3752
|
+
"name": "Adhere to PEP 8 Style Guide",
|
|
3753
|
+
"description": "Maintain a consistent and readable codebase following Python's official standards.",
|
|
3754
|
+
"category": "Backend",
|
|
3755
|
+
"severity": "major",
|
|
3756
|
+
"languages": [
|
|
3757
|
+
"python"
|
|
3758
|
+
],
|
|
3759
|
+
"version": "1.0",
|
|
3760
|
+
"status": "activated",
|
|
3761
|
+
"tags": [
|
|
3762
|
+
"Common",
|
|
3763
|
+
"readability",
|
|
3764
|
+
"code-quality"
|
|
3765
|
+
],
|
|
3766
|
+
"tools": [
|
|
3767
|
+
"ruff",
|
|
3768
|
+
"flake8",
|
|
3769
|
+
"black"
|
|
3770
|
+
],
|
|
3771
|
+
"framework": "All",
|
|
3772
|
+
"principles": []
|
|
3773
|
+
},
|
|
3774
|
+
"PY002": {
|
|
3775
|
+
"name": "Mandatory Type Hinting",
|
|
3776
|
+
"description": "Improve code clarity, enable better IDE support, and catch type-related bugs early.",
|
|
3777
|
+
"category": "Backend",
|
|
3778
|
+
"severity": "major",
|
|
3779
|
+
"languages": [
|
|
3780
|
+
"python"
|
|
3781
|
+
],
|
|
3782
|
+
"version": "1.0",
|
|
3783
|
+
"status": "activated",
|
|
3784
|
+
"tags": [
|
|
3785
|
+
"Common",
|
|
3786
|
+
"readability",
|
|
3787
|
+
"code-quality"
|
|
3788
|
+
],
|
|
3789
|
+
"tools": [
|
|
3790
|
+
"mypy",
|
|
3791
|
+
"Pyright"
|
|
3792
|
+
],
|
|
3793
|
+
"framework": "All",
|
|
3794
|
+
"principles": []
|
|
3795
|
+
},
|
|
3796
|
+
"PY003": {
|
|
3797
|
+
"name": "Explicit Error Handling",
|
|
3798
|
+
"description": "Prevent catching unexpected errors and ensure specific failure handling.",
|
|
3799
|
+
"category": "Backend",
|
|
3800
|
+
"severity": "critical",
|
|
3801
|
+
"languages": [
|
|
3802
|
+
"python"
|
|
3803
|
+
],
|
|
3804
|
+
"version": "1.0",
|
|
3805
|
+
"status": "activated",
|
|
3806
|
+
"tags": [
|
|
3807
|
+
"Common",
|
|
3808
|
+
"readability",
|
|
3809
|
+
"code-quality"
|
|
3810
|
+
],
|
|
3811
|
+
"tools": [
|
|
3812
|
+
"pylint",
|
|
3813
|
+
"ruff"
|
|
3814
|
+
],
|
|
3815
|
+
"framework": "All",
|
|
3816
|
+
"principles": []
|
|
3817
|
+
},
|
|
3818
|
+
"PY004": {
|
|
3819
|
+
"name": "Use logging instead of print",
|
|
3820
|
+
"description": "Better event tracking, filtering, and production observability.",
|
|
3821
|
+
"category": "Backend",
|
|
3822
|
+
"severity": "major",
|
|
3823
|
+
"languages": [
|
|
3824
|
+
"python"
|
|
3825
|
+
],
|
|
3826
|
+
"version": "1.0",
|
|
3827
|
+
"status": "activated",
|
|
3828
|
+
"tags": [
|
|
3829
|
+
"Common",
|
|
3830
|
+
"readability",
|
|
3831
|
+
"code-quality"
|
|
3832
|
+
],
|
|
3833
|
+
"tools": [
|
|
3834
|
+
"Manual Review",
|
|
3835
|
+
"ruff"
|
|
3836
|
+
],
|
|
3837
|
+
"framework": "All",
|
|
3838
|
+
"principles": []
|
|
3839
|
+
},
|
|
3840
|
+
"PY005": {
|
|
3841
|
+
"name": "Context Managers for Resource Handling",
|
|
3842
|
+
"description": "Ensure resources like files and network connections are closed properly.",
|
|
3843
|
+
"category": "Backend",
|
|
3844
|
+
"severity": "major",
|
|
3845
|
+
"languages": [
|
|
3846
|
+
"python"
|
|
3847
|
+
],
|
|
3848
|
+
"version": "1.0",
|
|
3849
|
+
"status": "activated",
|
|
3850
|
+
"tags": [
|
|
3851
|
+
"Common",
|
|
3852
|
+
"readability",
|
|
3853
|
+
"code-quality"
|
|
3854
|
+
],
|
|
3855
|
+
"tools": [
|
|
3856
|
+
"pylint",
|
|
3857
|
+
"ruff"
|
|
3858
|
+
],
|
|
3859
|
+
"framework": "All",
|
|
3860
|
+
"principles": []
|
|
3861
|
+
},
|
|
3862
|
+
"PY006": {
|
|
3863
|
+
"name": "Avoid Mutable Default Arguments",
|
|
3864
|
+
"description": "Prevent unexpected state sharing between function calls.",
|
|
3865
|
+
"category": "Backend",
|
|
3866
|
+
"severity": "major",
|
|
3867
|
+
"languages": [
|
|
3868
|
+
"python"
|
|
3869
|
+
],
|
|
3870
|
+
"version": "1.0",
|
|
3871
|
+
"status": "activated",
|
|
3872
|
+
"tags": [
|
|
3873
|
+
"Common",
|
|
3874
|
+
"readability",
|
|
3875
|
+
"code-quality"
|
|
3876
|
+
],
|
|
3877
|
+
"tools": [
|
|
3878
|
+
"pylint",
|
|
3879
|
+
"ruff"
|
|
3880
|
+
],
|
|
3881
|
+
"framework": "All",
|
|
3882
|
+
"principles": []
|
|
3883
|
+
},
|
|
3884
|
+
"R001": {
|
|
3885
|
+
"name": "Components must be idempotent",
|
|
3886
|
+
"description": "Ensure that React components always return the same output for the same inputs (props, state, context).",
|
|
3887
|
+
"category": "Frontend",
|
|
3888
|
+
"severity": "major",
|
|
3889
|
+
"languages": [
|
|
3890
|
+
"typescript"
|
|
3891
|
+
],
|
|
3892
|
+
"version": "1.0",
|
|
3893
|
+
"status": "activated",
|
|
3894
|
+
"tags": [
|
|
3895
|
+
"Common",
|
|
3896
|
+
"readability",
|
|
3897
|
+
"code-quality"
|
|
3898
|
+
],
|
|
3899
|
+
"tools": [],
|
|
3900
|
+
"framework": "All",
|
|
3901
|
+
"principles": [
|
|
3902
|
+
"CODE_QUALITY"
|
|
3903
|
+
]
|
|
3904
|
+
},
|
|
3905
|
+
"R002": {
|
|
3906
|
+
"name": "Side effects must run outside of render",
|
|
3907
|
+
"description": "Prevent side effects from executing during render to avoid bugs and improve performance.",
|
|
3908
|
+
"category": "Frontend",
|
|
3909
|
+
"severity": "major",
|
|
3910
|
+
"languages": [
|
|
3911
|
+
"typescript"
|
|
3912
|
+
],
|
|
3913
|
+
"version": "1.0",
|
|
3914
|
+
"status": "activated",
|
|
3915
|
+
"tags": [
|
|
3916
|
+
"Common",
|
|
3917
|
+
"readability",
|
|
3918
|
+
"code-quality"
|
|
3919
|
+
],
|
|
3920
|
+
"tools": [],
|
|
3921
|
+
"framework": "All",
|
|
3922
|
+
"principles": [
|
|
3923
|
+
"DESIGN_PATTERNS",
|
|
3924
|
+
"PERFORMANCE"
|
|
3925
|
+
]
|
|
3926
|
+
},
|
|
3927
|
+
"R003": {
|
|
3928
|
+
"name": "Props and state are immutable",
|
|
3929
|
+
"description": "Prevent direct mutation of props and state to avoid bugs and ensure proper behavior in React.",
|
|
3930
|
+
"category": "Frontend",
|
|
3931
|
+
"severity": "major",
|
|
3932
|
+
"languages": [
|
|
3933
|
+
"typescript"
|
|
3934
|
+
],
|
|
3935
|
+
"version": "1.0",
|
|
3936
|
+
"status": "activated",
|
|
3937
|
+
"tags": [
|
|
3938
|
+
"Common",
|
|
3939
|
+
"readability",
|
|
3940
|
+
"code-quality"
|
|
3941
|
+
],
|
|
3942
|
+
"tools": [],
|
|
3943
|
+
"framework": "All",
|
|
3944
|
+
"principles": [
|
|
3945
|
+
"CODE_QUALITY"
|
|
3946
|
+
]
|
|
3947
|
+
},
|
|
3948
|
+
"R004": {
|
|
3949
|
+
"name": "Return values and arguments to Hooks are immutable",
|
|
3950
|
+
"description": "Ensure that values passed into Hooks are not modified to prevent subtle bugs.",
|
|
3951
|
+
"category": "Frontend",
|
|
3952
|
+
"severity": "major",
|
|
3953
|
+
"languages": [
|
|
3954
|
+
"typescript"
|
|
3955
|
+
],
|
|
3956
|
+
"version": "1.0",
|
|
3957
|
+
"status": "activated",
|
|
3958
|
+
"tags": [
|
|
3959
|
+
"Common",
|
|
3960
|
+
"readability",
|
|
3961
|
+
"code-quality"
|
|
3962
|
+
],
|
|
3963
|
+
"tools": [],
|
|
3964
|
+
"framework": "All",
|
|
3965
|
+
"principles": [
|
|
3966
|
+
"CODE_QUALITY"
|
|
3967
|
+
]
|
|
3968
|
+
},
|
|
3969
|
+
"R005": {
|
|
3970
|
+
"name": "Values are immutable after being passed to JSX",
|
|
3971
|
+
"description": "Prevent mutation of values after they've been passed to JSX.",
|
|
3972
|
+
"category": "Frontend",
|
|
3973
|
+
"severity": "major",
|
|
3974
|
+
"languages": [
|
|
3975
|
+
"typescript"
|
|
3976
|
+
],
|
|
3977
|
+
"version": "1.0",
|
|
3978
|
+
"status": "activated",
|
|
3979
|
+
"tags": [
|
|
3980
|
+
"Common",
|
|
3981
|
+
"readability",
|
|
3982
|
+
"code-quality"
|
|
3983
|
+
],
|
|
3984
|
+
"tools": [],
|
|
3985
|
+
"framework": "All",
|
|
3986
|
+
"principles": [
|
|
3987
|
+
"CODE_QUALITY"
|
|
3988
|
+
]
|
|
3989
|
+
},
|
|
3990
|
+
"R006": {
|
|
3991
|
+
"name": "Never call component functions directly",
|
|
3992
|
+
"description": "Let React fully control when and how components are rendered.",
|
|
3993
|
+
"category": "Frontend",
|
|
3994
|
+
"severity": "major",
|
|
3995
|
+
"languages": [
|
|
3996
|
+
"typescript"
|
|
3997
|
+
],
|
|
3998
|
+
"version": "1.0",
|
|
3999
|
+
"status": "activated",
|
|
4000
|
+
"tags": [
|
|
4001
|
+
"Common",
|
|
4002
|
+
"readability",
|
|
4003
|
+
"code-quality"
|
|
4004
|
+
],
|
|
4005
|
+
"tools": [],
|
|
4006
|
+
"framework": "All",
|
|
4007
|
+
"principles": [
|
|
4008
|
+
"CODE_QUALITY",
|
|
4009
|
+
"DESIGN_PATTERNS"
|
|
4010
|
+
]
|
|
4011
|
+
},
|
|
4012
|
+
"R007": {
|
|
4013
|
+
"name": "Never pass hooks as regular values",
|
|
4014
|
+
"description": "Ensure that Hooks are used only as intended within React components.",
|
|
4015
|
+
"category": "Frontend",
|
|
4016
|
+
"severity": "major",
|
|
4017
|
+
"languages": [
|
|
4018
|
+
"typescript"
|
|
4019
|
+
],
|
|
4020
|
+
"version": "1.0",
|
|
4021
|
+
"status": "activated",
|
|
4022
|
+
"tags": [
|
|
4023
|
+
"Common",
|
|
4024
|
+
"readability",
|
|
4025
|
+
"code-quality"
|
|
4026
|
+
],
|
|
4027
|
+
"tools": [],
|
|
4028
|
+
"framework": "All",
|
|
4029
|
+
"principles": [
|
|
4030
|
+
"DESIGN_PATTERNS"
|
|
4031
|
+
]
|
|
4032
|
+
},
|
|
4033
|
+
"R008": {
|
|
4034
|
+
"name": "Only call Hooks at the top level",
|
|
4035
|
+
"description": "Maintain the correct order of Hook calls so React can manage state properly.",
|
|
4036
|
+
"category": "Frontend",
|
|
4037
|
+
"severity": "major",
|
|
4038
|
+
"languages": [
|
|
4039
|
+
"typescript"
|
|
4040
|
+
],
|
|
4041
|
+
"version": "1.0",
|
|
4042
|
+
"status": "activated",
|
|
4043
|
+
"tags": [
|
|
4044
|
+
"Common",
|
|
4045
|
+
"readability",
|
|
4046
|
+
"code-quality"
|
|
4047
|
+
],
|
|
4048
|
+
"tools": [],
|
|
4049
|
+
"framework": "All",
|
|
4050
|
+
"principles": [
|
|
4051
|
+
"DESIGN_PATTERNS"
|
|
4052
|
+
]
|
|
4053
|
+
},
|
|
4054
|
+
"R009": {
|
|
4055
|
+
"name": "Only call Hooks from React functions",
|
|
4056
|
+
"description": "Ensure Hooks are only called from valid React functions to prevent unexpected behavior.",
|
|
4057
|
+
"category": "Frontend",
|
|
4058
|
+
"severity": "major",
|
|
4059
|
+
"languages": [
|
|
4060
|
+
"typescript"
|
|
4061
|
+
],
|
|
4062
|
+
"version": "1.0",
|
|
4063
|
+
"status": "activated",
|
|
4064
|
+
"tags": [
|
|
4065
|
+
"Common",
|
|
4066
|
+
"readability",
|
|
4067
|
+
"code-quality"
|
|
4068
|
+
],
|
|
4069
|
+
"tools": [],
|
|
4070
|
+
"framework": "All",
|
|
4071
|
+
"principles": [
|
|
4072
|
+
"DESIGN_PATTERNS"
|
|
4073
|
+
]
|
|
4074
|
+
},
|
|
4075
|
+
"RB001": {
|
|
4076
|
+
"name": "Use snake_case for symbols, methods, and variables",
|
|
4077
|
+
"description": "Follow Ruby community naming conventions for consistency and readability.",
|
|
4078
|
+
"category": "Backend",
|
|
4079
|
+
"severity": "major",
|
|
4080
|
+
"languages": [
|
|
4081
|
+
"ruby"
|
|
4082
|
+
],
|
|
4083
|
+
"version": "1.0",
|
|
4084
|
+
"status": "activated",
|
|
4085
|
+
"tags": [
|
|
4086
|
+
"Common",
|
|
4087
|
+
"readability",
|
|
4088
|
+
"code-quality"
|
|
4089
|
+
],
|
|
4090
|
+
"tools": [
|
|
4091
|
+
"RuboCop (`Naming/VariableName`",
|
|
4092
|
+
"`Naming/MethodName`)"
|
|
4093
|
+
],
|
|
4094
|
+
"framework": "All",
|
|
4095
|
+
"principles": []
|
|
4096
|
+
},
|
|
4097
|
+
"RB002": {
|
|
4098
|
+
"name": "Use CamelCase for classes and modules",
|
|
4099
|
+
"description": "Follow Ruby community naming conventions for classes and modules.",
|
|
4100
|
+
"category": "Backend",
|
|
4101
|
+
"severity": "major",
|
|
4102
|
+
"languages": [
|
|
4103
|
+
"ruby"
|
|
4104
|
+
],
|
|
4105
|
+
"version": "1.0",
|
|
4106
|
+
"status": "activated",
|
|
4107
|
+
"tags": [
|
|
4108
|
+
"Common",
|
|
4109
|
+
"readability",
|
|
4110
|
+
"code-quality"
|
|
4111
|
+
],
|
|
4112
|
+
"tools": [
|
|
4113
|
+
"RuboCop (`Naming/ClassName`)"
|
|
4114
|
+
],
|
|
4115
|
+
"framework": "All",
|
|
4116
|
+
"principles": []
|
|
4117
|
+
},
|
|
4118
|
+
"RB003": {
|
|
4119
|
+
"name": "Use SCREAMING_SNAKE_CASE for constants",
|
|
4120
|
+
"description": "Clearly distinguish constants from other identifiers.",
|
|
4121
|
+
"category": "Backend",
|
|
4122
|
+
"severity": "major",
|
|
4123
|
+
"languages": [
|
|
4124
|
+
"ruby"
|
|
4125
|
+
],
|
|
4126
|
+
"version": "1.0",
|
|
4127
|
+
"status": "activated",
|
|
4128
|
+
"tags": [
|
|
4129
|
+
"Common",
|
|
4130
|
+
"readability",
|
|
4131
|
+
"code-quality"
|
|
4132
|
+
],
|
|
4133
|
+
"tools": [
|
|
4134
|
+
"RuboCop (`Naming/ConstantName`)"
|
|
4135
|
+
],
|
|
4136
|
+
"framework": "All",
|
|
4137
|
+
"principles": []
|
|
4138
|
+
},
|
|
4139
|
+
"RB004": {
|
|
4140
|
+
"name": "Predicate methods should end with ?",
|
|
4141
|
+
"description": "Make boolean-returning methods immediately recognizable.",
|
|
4142
|
+
"category": "Backend",
|
|
4143
|
+
"severity": "major",
|
|
4144
|
+
"languages": [
|
|
4145
|
+
"ruby"
|
|
4146
|
+
],
|
|
4147
|
+
"version": "1.0",
|
|
4148
|
+
"status": "activated",
|
|
4149
|
+
"tags": [
|
|
4150
|
+
"Common",
|
|
4151
|
+
"readability",
|
|
4152
|
+
"code-quality"
|
|
4153
|
+
],
|
|
4154
|
+
"tools": [
|
|
4155
|
+
"RuboCop (`Naming/PredicateName`)"
|
|
4156
|
+
],
|
|
4157
|
+
"framework": "All",
|
|
4158
|
+
"principles": []
|
|
4159
|
+
},
|
|
4160
|
+
"RB005": {
|
|
4161
|
+
"name": "Dangerous methods should end with !",
|
|
4162
|
+
"description": "Clearly indicate methods that modify the receiver or can raise exceptions.",
|
|
4163
|
+
"category": "Backend",
|
|
4164
|
+
"severity": "major",
|
|
4165
|
+
"languages": [
|
|
4166
|
+
"ruby"
|
|
4167
|
+
],
|
|
4168
|
+
"version": "1.0",
|
|
4169
|
+
"status": "activated",
|
|
4170
|
+
"tags": [
|
|
4171
|
+
"Common",
|
|
4172
|
+
"readability",
|
|
4173
|
+
"code-quality"
|
|
4174
|
+
],
|
|
4175
|
+
"tools": [
|
|
4176
|
+
"RuboCop (`Style/BangPredicate`)"
|
|
4177
|
+
],
|
|
4178
|
+
"framework": "All",
|
|
4179
|
+
"principles": []
|
|
4180
|
+
},
|
|
4181
|
+
"RB006": {
|
|
4182
|
+
"name": "Use 2 spaces for indentation",
|
|
4183
|
+
"description": "Follow Ruby community standard for code formatting.",
|
|
4184
|
+
"category": "Backend",
|
|
4185
|
+
"severity": "minor",
|
|
4186
|
+
"languages": [
|
|
4187
|
+
"ruby"
|
|
4188
|
+
],
|
|
4189
|
+
"version": "1.0",
|
|
4190
|
+
"status": "activated",
|
|
4191
|
+
"tags": [
|
|
4192
|
+
"Common",
|
|
4193
|
+
"readability",
|
|
4194
|
+
"code-quality"
|
|
4195
|
+
],
|
|
4196
|
+
"tools": [
|
|
4197
|
+
"RuboCop (`Layout/IndentationWidth`)"
|
|
4198
|
+
],
|
|
4199
|
+
"framework": "All",
|
|
4200
|
+
"principles": []
|
|
4201
|
+
},
|
|
4202
|
+
"RB007": {
|
|
4203
|
+
"name": "Keep lines under 120 characters",
|
|
4204
|
+
"description": "Improve code readability and prevent horizontal scrolling.",
|
|
4205
|
+
"category": "Backend",
|
|
4206
|
+
"severity": "minor",
|
|
4207
|
+
"languages": [
|
|
4208
|
+
"ruby"
|
|
4209
|
+
],
|
|
4210
|
+
"version": "1.0",
|
|
4211
|
+
"status": "activated",
|
|
4212
|
+
"tags": [
|
|
4213
|
+
"Common",
|
|
4214
|
+
"readability",
|
|
4215
|
+
"code-quality"
|
|
4216
|
+
],
|
|
4217
|
+
"tools": [
|
|
4218
|
+
"RuboCop (`Layout/LineLength`)"
|
|
4219
|
+
],
|
|
4220
|
+
"framework": "All",
|
|
4221
|
+
"principles": []
|
|
4222
|
+
},
|
|
4223
|
+
"RB008": {
|
|
4224
|
+
"name": "Avoid rescuing the Exception class",
|
|
4225
|
+
"description": "Prevent hiding critical system errors.",
|
|
4226
|
+
"category": "Backend",
|
|
4227
|
+
"severity": "critical",
|
|
4228
|
+
"languages": [
|
|
4229
|
+
"ruby"
|
|
4230
|
+
],
|
|
4231
|
+
"version": "1.0",
|
|
4232
|
+
"status": "activated",
|
|
4233
|
+
"tags": [
|
|
4234
|
+
"Common",
|
|
4235
|
+
"readability",
|
|
4236
|
+
"code-quality"
|
|
4237
|
+
],
|
|
4238
|
+
"tools": [
|
|
4239
|
+
"RuboCop (`Lint/RescueException`)"
|
|
4240
|
+
],
|
|
4241
|
+
"framework": "All",
|
|
4242
|
+
"principles": []
|
|
4243
|
+
},
|
|
4244
|
+
"RB009": {
|
|
4245
|
+
"name": "Use save! or handle return values",
|
|
4246
|
+
"description": "Ensure database operations are properly validated and errors are not silently ignored.",
|
|
4247
|
+
"category": "Backend",
|
|
4248
|
+
"severity": "critical",
|
|
4249
|
+
"languages": [
|
|
4250
|
+
"ruby"
|
|
4251
|
+
],
|
|
4252
|
+
"version": "1.0",
|
|
4253
|
+
"status": "activated",
|
|
4254
|
+
"tags": [
|
|
4255
|
+
"Common",
|
|
4256
|
+
"readability",
|
|
4257
|
+
"code-quality"
|
|
4258
|
+
],
|
|
4259
|
+
"tools": [
|
|
4260
|
+
"RuboCop (`Rails/SaveBang`)"
|
|
4261
|
+
],
|
|
4262
|
+
"framework": "All",
|
|
4263
|
+
"principles": []
|
|
4264
|
+
},
|
|
4265
|
+
"RB010": {
|
|
4266
|
+
"name": "Avoid N+1 queries with eager loading",
|
|
4267
|
+
"description": "Prevent performance issues caused by N+1 query problems.",
|
|
4268
|
+
"category": "Backend",
|
|
4269
|
+
"severity": "major",
|
|
4270
|
+
"languages": [
|
|
4271
|
+
"ruby"
|
|
4272
|
+
],
|
|
4273
|
+
"version": "1.0",
|
|
4274
|
+
"status": "activated",
|
|
4275
|
+
"tags": [
|
|
4276
|
+
"Common",
|
|
4277
|
+
"readability",
|
|
4278
|
+
"code-quality"
|
|
4279
|
+
],
|
|
4280
|
+
"tools": [
|
|
4281
|
+
"Bullet gem",
|
|
4282
|
+
"RuboCop Rails (`Rails/FindEach`)"
|
|
4283
|
+
],
|
|
4284
|
+
"framework": "All",
|
|
4285
|
+
"principles": []
|
|
4286
|
+
},
|
|
4287
|
+
"RB011": {
|
|
4288
|
+
"name": "Use find_each for large collections",
|
|
4289
|
+
"description": "Reduce memory consumption when iterating over large datasets.",
|
|
4290
|
+
"category": "Backend",
|
|
4291
|
+
"severity": "major",
|
|
4292
|
+
"languages": [
|
|
4293
|
+
"ruby"
|
|
4294
|
+
],
|
|
4295
|
+
"version": "1.0",
|
|
4296
|
+
"status": "activated",
|
|
4297
|
+
"tags": [
|
|
4298
|
+
"Common",
|
|
4299
|
+
"readability",
|
|
4300
|
+
"code-quality"
|
|
4301
|
+
],
|
|
4302
|
+
"tools": [
|
|
4303
|
+
"RuboCop (`Rails/FindEach`)"
|
|
4304
|
+
],
|
|
4305
|
+
"framework": "All",
|
|
4306
|
+
"principles": []
|
|
4307
|
+
},
|
|
4308
|
+
"RB012": {
|
|
4309
|
+
"name": "Avoid SQL injection with parameterized queries",
|
|
4310
|
+
"description": "Prevent SQL injection vulnerabilities.",
|
|
4311
|
+
"category": "Backend",
|
|
4312
|
+
"severity": "critical",
|
|
4313
|
+
"languages": [
|
|
4314
|
+
"ruby"
|
|
4315
|
+
],
|
|
4316
|
+
"version": "1.0",
|
|
4317
|
+
"status": "activated",
|
|
4318
|
+
"tags": [
|
|
4319
|
+
"Common",
|
|
4320
|
+
"readability",
|
|
4321
|
+
"code-quality"
|
|
4322
|
+
],
|
|
4323
|
+
"tools": [
|
|
4324
|
+
"Brakeman",
|
|
4325
|
+
"RuboCop (`Rails/SquishedSQLHeredocs`)"
|
|
4326
|
+
],
|
|
4327
|
+
"framework": "All",
|
|
4328
|
+
"principles": []
|
|
4329
|
+
},
|
|
4330
|
+
"RB013": {
|
|
4331
|
+
"name": "Prefer has_many :through over HABTM",
|
|
4332
|
+
"description": "Allow for additional attributes and validations on join models.",
|
|
4333
|
+
"category": "Backend",
|
|
4334
|
+
"severity": "major",
|
|
4335
|
+
"languages": [
|
|
4336
|
+
"ruby"
|
|
4337
|
+
],
|
|
4338
|
+
"version": "1.0",
|
|
4339
|
+
"status": "activated",
|
|
4340
|
+
"tags": [
|
|
4341
|
+
"Common",
|
|
4342
|
+
"readability",
|
|
4343
|
+
"code-quality"
|
|
4344
|
+
],
|
|
4345
|
+
"tools": [
|
|
4346
|
+
"RuboCop (`Rails/HasAndBelongsToMany`)"
|
|
4347
|
+
],
|
|
4348
|
+
"framework": "All",
|
|
4349
|
+
"principles": []
|
|
4350
|
+
},
|
|
4351
|
+
"RB014": {
|
|
4352
|
+
"name": "Always define dependent option for associations",
|
|
4353
|
+
"description": "Prevent orphaned records and ensure data integrity.",
|
|
4354
|
+
"category": "Backend",
|
|
4355
|
+
"severity": "major",
|
|
4356
|
+
"languages": [
|
|
4357
|
+
"ruby"
|
|
4358
|
+
],
|
|
4359
|
+
"version": "1.0",
|
|
4360
|
+
"status": "activated",
|
|
4361
|
+
"tags": [
|
|
4362
|
+
"Common",
|
|
4363
|
+
"readability",
|
|
4364
|
+
"code-quality"
|
|
4365
|
+
],
|
|
4366
|
+
"tools": [
|
|
4367
|
+
"Custom linter"
|
|
4368
|
+
],
|
|
4369
|
+
"framework": "All",
|
|
4370
|
+
"principles": []
|
|
4371
|
+
},
|
|
4372
|
+
"RB015": {
|
|
4373
|
+
"name": "Use new-style validations",
|
|
4374
|
+
"description": "Follow modern Rails conventions for model validations.",
|
|
4375
|
+
"category": "Backend",
|
|
4376
|
+
"severity": "major",
|
|
4377
|
+
"languages": [
|
|
4378
|
+
"ruby"
|
|
4379
|
+
],
|
|
4380
|
+
"version": "1.0",
|
|
4381
|
+
"status": "activated",
|
|
4382
|
+
"tags": [
|
|
4383
|
+
"Common",
|
|
4384
|
+
"readability",
|
|
4385
|
+
"code-quality"
|
|
4386
|
+
],
|
|
4387
|
+
"tools": [
|
|
4388
|
+
"RuboCop (`Rails/Validation`)"
|
|
4389
|
+
],
|
|
4390
|
+
"framework": "All",
|
|
4391
|
+
"principles": []
|
|
4392
|
+
},
|
|
4393
|
+
"RB016": {
|
|
4394
|
+
"name": "Keep controllers thin",
|
|
4395
|
+
"description": "Maintain single responsibility and improve testability.",
|
|
4396
|
+
"category": "Backend",
|
|
4397
|
+
"severity": "major",
|
|
4398
|
+
"languages": [
|
|
4399
|
+
"ruby"
|
|
4400
|
+
],
|
|
4401
|
+
"version": "1.0",
|
|
4402
|
+
"status": "activated",
|
|
4403
|
+
"tags": [
|
|
4404
|
+
"Common",
|
|
4405
|
+
"readability",
|
|
4406
|
+
"code-quality"
|
|
4407
|
+
],
|
|
4408
|
+
"tools": [
|
|
4409
|
+
"RuboCop (`Metrics/MethodLength`)"
|
|
4410
|
+
],
|
|
4411
|
+
"framework": "All",
|
|
4412
|
+
"principles": []
|
|
4413
|
+
},
|
|
4414
|
+
"RB017": {
|
|
4415
|
+
"name": "Avoid fat models",
|
|
4416
|
+
"description": "Prevent models from becoming monolithic and hard to maintain.",
|
|
4417
|
+
"category": "Backend",
|
|
4418
|
+
"severity": "major",
|
|
4419
|
+
"languages": [
|
|
4420
|
+
"ruby"
|
|
4421
|
+
],
|
|
4422
|
+
"version": "1.0",
|
|
4423
|
+
"status": "activated",
|
|
4424
|
+
"tags": [
|
|
4425
|
+
"Common",
|
|
4426
|
+
"readability",
|
|
4427
|
+
"code-quality"
|
|
4428
|
+
],
|
|
4429
|
+
"tools": [
|
|
4430
|
+
"RuboCop (`Metrics/ClassLength`)"
|
|
4431
|
+
],
|
|
4432
|
+
"framework": "All",
|
|
4433
|
+
"principles": []
|
|
4434
|
+
},
|
|
4435
|
+
"RB018": {
|
|
4436
|
+
"name": "Use service objects for complex business logic",
|
|
4437
|
+
"description": "Improve code organization and testability.",
|
|
4438
|
+
"category": "Backend",
|
|
4439
|
+
"severity": "major",
|
|
4440
|
+
"languages": [
|
|
4441
|
+
"ruby"
|
|
4442
|
+
],
|
|
4443
|
+
"version": "1.0",
|
|
4444
|
+
"status": "activated",
|
|
4445
|
+
"tags": [
|
|
4446
|
+
"Common",
|
|
4447
|
+
"readability",
|
|
4448
|
+
"code-quality"
|
|
4449
|
+
],
|
|
4450
|
+
"tools": [
|
|
4451
|
+
"Custom linter"
|
|
4452
|
+
],
|
|
4453
|
+
"framework": "All",
|
|
4454
|
+
"principles": []
|
|
4455
|
+
},
|
|
4456
|
+
"RB019": {
|
|
4457
|
+
"name": "Avoid needless metaprogramming",
|
|
4458
|
+
"description": "Maintain code clarity and debuggability.",
|
|
4459
|
+
"category": "Backend",
|
|
4460
|
+
"severity": "major",
|
|
4461
|
+
"languages": [
|
|
4462
|
+
"ruby"
|
|
4463
|
+
],
|
|
4464
|
+
"version": "1.0",
|
|
4465
|
+
"status": "activated",
|
|
4466
|
+
"tags": [
|
|
4467
|
+
"Common",
|
|
4468
|
+
"readability",
|
|
4469
|
+
"code-quality"
|
|
4470
|
+
],
|
|
4471
|
+
"tools": [
|
|
4472
|
+
"RuboCop (`Style/MethodMissingSuper`)"
|
|
4473
|
+
],
|
|
4474
|
+
"framework": "All",
|
|
4475
|
+
"principles": []
|
|
4476
|
+
},
|
|
4477
|
+
"RB020": {
|
|
4478
|
+
"name": "Use pluck for selecting specific columns",
|
|
4479
|
+
"description": "Improve query performance by selecting only needed columns.",
|
|
4480
|
+
"category": "Backend",
|
|
4481
|
+
"severity": "major",
|
|
4482
|
+
"languages": [
|
|
4483
|
+
"ruby"
|
|
4484
|
+
],
|
|
4485
|
+
"version": "1.0",
|
|
4486
|
+
"status": "activated",
|
|
4487
|
+
"tags": [
|
|
4488
|
+
"Common",
|
|
4489
|
+
"readability",
|
|
4490
|
+
"code-quality"
|
|
4491
|
+
],
|
|
4492
|
+
"tools": [
|
|
4493
|
+
"RuboCop (`Rails/Pluck`",
|
|
4494
|
+
"`Rails/PluckId`)"
|
|
4495
|
+
],
|
|
4496
|
+
"framework": "All",
|
|
4497
|
+
"principles": []
|
|
4498
|
+
},
|
|
4499
|
+
"RB021": {
|
|
4500
|
+
"name": "Use size over count or length",
|
|
4501
|
+
"description": "Optimize performance by using the most efficient method.",
|
|
4502
|
+
"category": "Backend",
|
|
4503
|
+
"severity": "minor",
|
|
4504
|
+
"languages": [
|
|
4505
|
+
"ruby"
|
|
4506
|
+
],
|
|
4507
|
+
"version": "1.0",
|
|
4508
|
+
"status": "activated",
|
|
4509
|
+
"tags": [
|
|
4510
|
+
"Common",
|
|
4511
|
+
"readability",
|
|
4512
|
+
"code-quality"
|
|
4513
|
+
],
|
|
4514
|
+
"tools": [
|
|
4515
|
+
"RuboCop (`Rails/SkipsModelValidations`)"
|
|
4516
|
+
],
|
|
4517
|
+
"framework": "All",
|
|
4518
|
+
"principles": []
|
|
4519
|
+
},
|
|
4520
|
+
"RB022": {
|
|
4521
|
+
"name": "Order by timestamp columns, not id",
|
|
4522
|
+
"description": "Ensure consistent ordering across database systems.",
|
|
4523
|
+
"category": "Backend",
|
|
4524
|
+
"severity": "major",
|
|
4525
|
+
"languages": [
|
|
4526
|
+
"ruby"
|
|
4527
|
+
],
|
|
4528
|
+
"version": "1.0",
|
|
4529
|
+
"status": "activated",
|
|
4530
|
+
"tags": [
|
|
4531
|
+
"Common",
|
|
4532
|
+
"readability",
|
|
4533
|
+
"code-quality"
|
|
4534
|
+
],
|
|
4535
|
+
"tools": [
|
|
4536
|
+
"Custom linter"
|
|
4537
|
+
],
|
|
4538
|
+
"framework": "All",
|
|
4539
|
+
"principles": []
|
|
4540
|
+
},
|
|
4541
|
+
"RB023": {
|
|
4542
|
+
"name": "Use where.missing for Rails 6.1+",
|
|
4543
|
+
"description": "Use modern Rails APIs for finding records with missing associations.",
|
|
4544
|
+
"category": "Backend",
|
|
4545
|
+
"severity": "minor",
|
|
4546
|
+
"languages": [
|
|
4547
|
+
"ruby"
|
|
4548
|
+
],
|
|
4549
|
+
"version": "1.0",
|
|
4550
|
+
"status": "activated",
|
|
4551
|
+
"tags": [
|
|
4552
|
+
"Common",
|
|
4553
|
+
"readability",
|
|
4554
|
+
"code-quality"
|
|
4555
|
+
],
|
|
4556
|
+
"tools": [
|
|
4557
|
+
"RuboCop (`Rails/WhereMissing`)"
|
|
4558
|
+
],
|
|
4559
|
+
"framework": "All",
|
|
4560
|
+
"principles": []
|
|
4561
|
+
},
|
|
4562
|
+
"RB024": {
|
|
4563
|
+
"name": "Keep methods under 10 lines",
|
|
4564
|
+
"description": "Improve code readability and maintainability.",
|
|
4565
|
+
"category": "Backend",
|
|
4566
|
+
"severity": "major",
|
|
4567
|
+
"languages": [
|
|
4568
|
+
"ruby"
|
|
4569
|
+
],
|
|
4570
|
+
"version": "1.0",
|
|
4571
|
+
"status": "activated",
|
|
4572
|
+
"tags": [
|
|
4573
|
+
"Common",
|
|
4574
|
+
"readability",
|
|
4575
|
+
"code-quality"
|
|
4576
|
+
],
|
|
4577
|
+
"tools": [
|
|
4578
|
+
"RuboCop (`Metrics/MethodLength`)"
|
|
4579
|
+
],
|
|
4580
|
+
"framework": "All",
|
|
4581
|
+
"principles": []
|
|
4582
|
+
},
|
|
4583
|
+
"RB025": {
|
|
4584
|
+
"name": "Limit method parameters to 4",
|
|
4585
|
+
"description": "Reduce method complexity and improve readability.",
|
|
4586
|
+
"category": "Backend",
|
|
4587
|
+
"severity": "major",
|
|
4588
|
+
"languages": [
|
|
4589
|
+
"ruby"
|
|
4590
|
+
],
|
|
4591
|
+
"version": "1.0",
|
|
4592
|
+
"status": "activated",
|
|
4593
|
+
"tags": [
|
|
4594
|
+
"Common",
|
|
4595
|
+
"readability",
|
|
4596
|
+
"code-quality"
|
|
4597
|
+
],
|
|
4598
|
+
"tools": [
|
|
4599
|
+
"RuboCop (`Metrics/ParameterLists`)"
|
|
4600
|
+
],
|
|
4601
|
+
"framework": "All",
|
|
4602
|
+
"principles": []
|
|
4603
|
+
},
|
|
4604
|
+
"RB026": {
|
|
4605
|
+
"name": "Avoid deep nesting (max 3 levels)",
|
|
4606
|
+
"description": "Improve code readability and reduce cyclomatic complexity.",
|
|
4607
|
+
"category": "Backend",
|
|
4608
|
+
"severity": "major",
|
|
4609
|
+
"languages": [
|
|
4610
|
+
"ruby"
|
|
4611
|
+
],
|
|
4612
|
+
"version": "1.0",
|
|
4613
|
+
"status": "activated",
|
|
4614
|
+
"tags": [
|
|
4615
|
+
"Common",
|
|
4616
|
+
"readability",
|
|
4617
|
+
"code-quality"
|
|
4618
|
+
],
|
|
4619
|
+
"tools": [
|
|
4620
|
+
"RuboCop (`Metrics/BlockNesting`)"
|
|
4621
|
+
],
|
|
4622
|
+
"framework": "All",
|
|
4623
|
+
"principles": []
|
|
4624
|
+
},
|
|
4625
|
+
"RB027": {
|
|
4626
|
+
"name": "Use guard clauses for early returns",
|
|
4627
|
+
"description": "Reduce nesting and improve code clarity.",
|
|
4628
|
+
"category": "Backend",
|
|
4629
|
+
"severity": "major",
|
|
4630
|
+
"languages": [
|
|
4631
|
+
"ruby"
|
|
4632
|
+
],
|
|
4633
|
+
"version": "1.0",
|
|
4634
|
+
"status": "activated",
|
|
4635
|
+
"tags": [
|
|
4636
|
+
"Common",
|
|
4637
|
+
"readability",
|
|
4638
|
+
"code-quality"
|
|
4639
|
+
],
|
|
4640
|
+
"tools": [
|
|
4641
|
+
"RuboCop (`Style/GuardClause`)"
|
|
4642
|
+
],
|
|
4643
|
+
"framework": "All",
|
|
4644
|
+
"principles": []
|
|
4645
|
+
},
|
|
4646
|
+
"RB028": {
|
|
4647
|
+
"name": "Keep classes under 100 lines",
|
|
4648
|
+
"description": "Maintain single responsibility and improve maintainability.",
|
|
4649
|
+
"category": "Backend",
|
|
4650
|
+
"severity": "major",
|
|
4651
|
+
"languages": [
|
|
4652
|
+
"ruby"
|
|
4653
|
+
],
|
|
4654
|
+
"version": "1.0",
|
|
4655
|
+
"status": "activated",
|
|
4656
|
+
"tags": [
|
|
4657
|
+
"Common",
|
|
4658
|
+
"readability",
|
|
4659
|
+
"code-quality"
|
|
4660
|
+
],
|
|
4661
|
+
"tools": [
|
|
4662
|
+
"RuboCop (`Metrics/ClassLength`)"
|
|
4663
|
+
],
|
|
4664
|
+
"framework": "All",
|
|
4665
|
+
"principles": []
|
|
4666
|
+
},
|
|
4667
|
+
"RB029": {
|
|
4668
|
+
"name": "Use meaningful variable and method names",
|
|
4669
|
+
"description": "Improve code self-documentation and readability.",
|
|
4670
|
+
"category": "Backend",
|
|
4671
|
+
"severity": "major",
|
|
4672
|
+
"languages": [
|
|
4673
|
+
"ruby"
|
|
4674
|
+
],
|
|
4675
|
+
"version": "1.0",
|
|
4676
|
+
"status": "activated",
|
|
4677
|
+
"tags": [
|
|
4678
|
+
"Common",
|
|
4679
|
+
"readability",
|
|
4680
|
+
"code-quality"
|
|
4681
|
+
],
|
|
4682
|
+
"tools": [
|
|
4683
|
+
"RuboCop (`Naming/VariableName`)"
|
|
4684
|
+
],
|
|
4685
|
+
"framework": "All",
|
|
4686
|
+
"principles": []
|
|
4687
|
+
},
|
|
4688
|
+
"RB030": {
|
|
4689
|
+
"name": "Don't Repeat Yourself (DRY)",
|
|
4690
|
+
"description": "Reduce code duplication and improve maintainability.",
|
|
4691
|
+
"category": "Backend",
|
|
4692
|
+
"severity": "major",
|
|
4693
|
+
"languages": [
|
|
4694
|
+
"ruby"
|
|
4695
|
+
],
|
|
4696
|
+
"version": "1.0",
|
|
4697
|
+
"status": "activated",
|
|
4698
|
+
"tags": [
|
|
4699
|
+
"Common",
|
|
4700
|
+
"readability",
|
|
4701
|
+
"code-quality"
|
|
4702
|
+
],
|
|
4703
|
+
"tools": [
|
|
4704
|
+
"Reek",
|
|
4705
|
+
"RuboCop (`Style/IdenticalConditionalBranches`)"
|
|
4706
|
+
],
|
|
4707
|
+
"framework": "All",
|
|
4708
|
+
"principles": []
|
|
4709
|
+
},
|
|
4710
|
+
"RB031": {
|
|
4711
|
+
"name": "Follow MVC architecture strictly",
|
|
4712
|
+
"description": "Maintain clear separation of concerns.",
|
|
4713
|
+
"category": "Backend",
|
|
4714
|
+
"severity": "critical",
|
|
4715
|
+
"languages": [
|
|
4716
|
+
"ruby"
|
|
4717
|
+
],
|
|
4718
|
+
"version": "1.0",
|
|
4719
|
+
"status": "activated",
|
|
4720
|
+
"tags": [
|
|
4721
|
+
"Common",
|
|
4722
|
+
"readability",
|
|
4723
|
+
"code-quality"
|
|
4724
|
+
],
|
|
4725
|
+
"tools": [
|
|
4726
|
+
"Custom linter"
|
|
4727
|
+
],
|
|
4728
|
+
"framework": "All",
|
|
4729
|
+
"principles": []
|
|
4730
|
+
},
|
|
4731
|
+
"RB032": {
|
|
4732
|
+
"name": "Use concerns judiciously",
|
|
4733
|
+
"description": "Prevent concerns from becoming dumping grounds for unrelated code.",
|
|
4734
|
+
"category": "Backend",
|
|
4735
|
+
"severity": "major",
|
|
4736
|
+
"languages": [
|
|
4737
|
+
"ruby"
|
|
4738
|
+
],
|
|
4739
|
+
"version": "1.0",
|
|
4740
|
+
"status": "activated",
|
|
4741
|
+
"tags": [
|
|
4742
|
+
"Common",
|
|
4743
|
+
"readability",
|
|
4744
|
+
"code-quality"
|
|
4745
|
+
],
|
|
4746
|
+
"tools": [
|
|
4747
|
+
"Custom linter"
|
|
4748
|
+
],
|
|
4749
|
+
"framework": "All",
|
|
4750
|
+
"principles": []
|
|
4751
|
+
},
|
|
4752
|
+
"RB033": {
|
|
4753
|
+
"name": "Document callbacks and use them sparingly",
|
|
4754
|
+
"description": "Prevent hidden side effects and improve code clarity.",
|
|
4755
|
+
"category": "Backend",
|
|
4756
|
+
"severity": "major",
|
|
4757
|
+
"languages": [
|
|
4758
|
+
"ruby"
|
|
4759
|
+
],
|
|
4760
|
+
"version": "1.0",
|
|
4761
|
+
"status": "activated",
|
|
4762
|
+
"tags": [
|
|
4763
|
+
"Common",
|
|
4764
|
+
"readability",
|
|
4765
|
+
"code-quality"
|
|
4766
|
+
],
|
|
4767
|
+
"tools": [
|
|
4768
|
+
"Custom linter"
|
|
4769
|
+
],
|
|
4770
|
+
"framework": "All",
|
|
4771
|
+
"principles": []
|
|
4772
|
+
},
|
|
4773
|
+
"RB034": {
|
|
4774
|
+
"name": "Use decorators for view logic",
|
|
4775
|
+
"description": "Keep models and views clean by separating presentation logic.",
|
|
4776
|
+
"category": "Backend",
|
|
4777
|
+
"severity": "major",
|
|
4778
|
+
"languages": [
|
|
4779
|
+
"ruby"
|
|
4780
|
+
],
|
|
4781
|
+
"version": "1.0",
|
|
4782
|
+
"status": "activated",
|
|
4783
|
+
"tags": [
|
|
4784
|
+
"Common",
|
|
4785
|
+
"readability",
|
|
4786
|
+
"code-quality"
|
|
4787
|
+
],
|
|
4788
|
+
"tools": [
|
|
4789
|
+
"Custom linter"
|
|
4790
|
+
],
|
|
4791
|
+
"framework": "All",
|
|
4792
|
+
"principles": []
|
|
4793
|
+
},
|
|
4794
|
+
"RB035": {
|
|
4795
|
+
"name": "Write comprehensive tests",
|
|
4796
|
+
"description": "Ensure code quality and prevent regressions.",
|
|
4797
|
+
"category": "Backend",
|
|
4798
|
+
"severity": "critical",
|
|
4799
|
+
"languages": [
|
|
4800
|
+
"ruby"
|
|
4801
|
+
],
|
|
4802
|
+
"version": "1.0",
|
|
4803
|
+
"status": "activated",
|
|
4804
|
+
"tags": [
|
|
4805
|
+
"Common",
|
|
4806
|
+
"readability",
|
|
4807
|
+
"code-quality"
|
|
4808
|
+
],
|
|
4809
|
+
"tools": [
|
|
4810
|
+
"RSpec",
|
|
4811
|
+
"Minitest",
|
|
4812
|
+
"SimpleCov"
|
|
4813
|
+
],
|
|
4814
|
+
"framework": "All",
|
|
4815
|
+
"principles": []
|
|
3376
4816
|
},
|
|
3377
|
-
"
|
|
3378
|
-
"name": "
|
|
3379
|
-
"description": "
|
|
3380
|
-
"category": "
|
|
3381
|
-
"severity": "
|
|
4817
|
+
"RB036": {
|
|
4818
|
+
"name": "Use frozen_string_literal: true",
|
|
4819
|
+
"description": "Improve memory efficiency and prepare for Ruby 4.0 string immutability.",
|
|
4820
|
+
"category": "Backend",
|
|
4821
|
+
"severity": "minor",
|
|
3382
4822
|
"languages": [
|
|
3383
|
-
"
|
|
4823
|
+
"ruby"
|
|
3384
4824
|
],
|
|
3385
|
-
"version": "1.
|
|
4825
|
+
"version": "1.1",
|
|
3386
4826
|
"status": "activated",
|
|
3387
4827
|
"tags": [
|
|
3388
4828
|
"Common",
|
|
@@ -3390,209 +4830,204 @@
|
|
|
3390
4830
|
"code-quality"
|
|
3391
4831
|
],
|
|
3392
4832
|
"tools": [
|
|
3393
|
-
"
|
|
3394
|
-
"Code Review"
|
|
4833
|
+
"RuboCop (`Style/FrozenStringLiteralComment`)"
|
|
3395
4834
|
],
|
|
3396
4835
|
"framework": "All",
|
|
3397
|
-
"principles": [
|
|
3398
|
-
"CODE_QUALITY"
|
|
3399
|
-
]
|
|
4836
|
+
"principles": []
|
|
3400
4837
|
},
|
|
3401
|
-
"
|
|
3402
|
-
"name": "
|
|
3403
|
-
"description": "
|
|
3404
|
-
"category": "
|
|
3405
|
-
"severity": "
|
|
4838
|
+
"RB037": {
|
|
4839
|
+
"name": "Use 'it' as a default block parameter (Ruby 3.4+)",
|
|
4840
|
+
"description": "Enhance code readability for concise block operations.",
|
|
4841
|
+
"category": "Backend",
|
|
4842
|
+
"severity": "minor",
|
|
3406
4843
|
"languages": [
|
|
3407
|
-
"
|
|
4844
|
+
"ruby"
|
|
3408
4845
|
],
|
|
3409
|
-
"version": "1.
|
|
4846
|
+
"version": "1.1",
|
|
3410
4847
|
"status": "activated",
|
|
3411
4848
|
"tags": [
|
|
3412
4849
|
"Common",
|
|
3413
4850
|
"readability",
|
|
3414
4851
|
"code-quality"
|
|
3415
4852
|
],
|
|
3416
|
-
"tools": [
|
|
4853
|
+
"tools": [
|
|
4854
|
+
"RuboCop (`Style/ItAssignment`)"
|
|
4855
|
+
],
|
|
3417
4856
|
"framework": "All",
|
|
3418
|
-
"principles": [
|
|
3419
|
-
"CODE_QUALITY"
|
|
3420
|
-
]
|
|
4857
|
+
"principles": []
|
|
3421
4858
|
},
|
|
3422
|
-
"
|
|
3423
|
-
"name": "
|
|
3424
|
-
"description": "
|
|
3425
|
-
"category": "
|
|
4859
|
+
"RB038": {
|
|
4860
|
+
"name": "Use modern hash-based enum syntax",
|
|
4861
|
+
"description": "Use the more readable and explicit enum configuration in ActiveRecord.",
|
|
4862
|
+
"category": "Backend",
|
|
3426
4863
|
"severity": "major",
|
|
3427
4864
|
"languages": [
|
|
3428
|
-
"
|
|
4865
|
+
"Rails 7+"
|
|
3429
4866
|
],
|
|
3430
|
-
"version": "1.
|
|
4867
|
+
"version": "1.1",
|
|
3431
4868
|
"status": "activated",
|
|
3432
4869
|
"tags": [
|
|
3433
4870
|
"Common",
|
|
3434
4871
|
"readability",
|
|
3435
4872
|
"code-quality"
|
|
3436
4873
|
],
|
|
3437
|
-
"tools": [
|
|
4874
|
+
"tools": [
|
|
4875
|
+
"RuboCop (`Rails/EnumSyntax`)"
|
|
4876
|
+
],
|
|
3438
4877
|
"framework": "All",
|
|
3439
|
-
"principles": [
|
|
3440
|
-
"DESIGN_PATTERNS",
|
|
3441
|
-
"PERFORMANCE"
|
|
3442
|
-
]
|
|
4878
|
+
"principles": []
|
|
3443
4879
|
},
|
|
3444
|
-
"
|
|
3445
|
-
"name": "
|
|
3446
|
-
"description": "
|
|
3447
|
-
"category": "
|
|
4880
|
+
"RB039": {
|
|
4881
|
+
"name": "Prefer Solid Adapters for Infrastructure (Rails 8+)",
|
|
4882
|
+
"description": "Simplify deployment and reduce external dependencies.",
|
|
4883
|
+
"category": "Backend",
|
|
3448
4884
|
"severity": "major",
|
|
3449
4885
|
"languages": [
|
|
3450
|
-
"
|
|
4886
|
+
"Rails 8+"
|
|
3451
4887
|
],
|
|
3452
|
-
"version": "1.
|
|
4888
|
+
"version": "1.1",
|
|
3453
4889
|
"status": "activated",
|
|
3454
4890
|
"tags": [
|
|
3455
4891
|
"Common",
|
|
3456
4892
|
"readability",
|
|
3457
4893
|
"code-quality"
|
|
3458
4894
|
],
|
|
3459
|
-
"tools": [
|
|
4895
|
+
"tools": [
|
|
4896
|
+
"Manual Review"
|
|
4897
|
+
],
|
|
3460
4898
|
"framework": "All",
|
|
3461
|
-
"principles": [
|
|
3462
|
-
"CODE_QUALITY"
|
|
3463
|
-
]
|
|
4899
|
+
"principles": []
|
|
3464
4900
|
},
|
|
3465
|
-
"
|
|
3466
|
-
"name": "
|
|
3467
|
-
"description": "
|
|
3468
|
-
"category": "
|
|
4901
|
+
"RB040": {
|
|
4902
|
+
"name": "Use built-in Rails 8 Authentication for greenfield projects",
|
|
4903
|
+
"description": "Use the native, lightweight authentication system to reduce dependency on Devise.",
|
|
4904
|
+
"category": "Backend",
|
|
3469
4905
|
"severity": "major",
|
|
3470
4906
|
"languages": [
|
|
3471
|
-
"
|
|
4907
|
+
"Rails 8+"
|
|
3472
4908
|
],
|
|
3473
|
-
"version": "1.
|
|
4909
|
+
"version": "1.1",
|
|
3474
4910
|
"status": "activated",
|
|
3475
4911
|
"tags": [
|
|
3476
4912
|
"Common",
|
|
3477
4913
|
"readability",
|
|
3478
4914
|
"code-quality"
|
|
3479
4915
|
],
|
|
3480
|
-
"tools": [
|
|
4916
|
+
"tools": [
|
|
4917
|
+
"Manual Review"
|
|
4918
|
+
],
|
|
3481
4919
|
"framework": "All",
|
|
3482
|
-
"principles": [
|
|
3483
|
-
"CODE_QUALITY"
|
|
3484
|
-
]
|
|
4920
|
+
"principles": []
|
|
3485
4921
|
},
|
|
3486
|
-
"
|
|
3487
|
-
"name": "
|
|
3488
|
-
"description": "
|
|
3489
|
-
"category": "
|
|
4922
|
+
"RB041": {
|
|
4923
|
+
"name": "Use Async Query Loading for slow interactions",
|
|
4924
|
+
"description": "Improve web performance by loading database data concurrently with view rendering.",
|
|
4925
|
+
"category": "Backend",
|
|
3490
4926
|
"severity": "major",
|
|
3491
4927
|
"languages": [
|
|
3492
|
-
"
|
|
4928
|
+
"Rails 7.1+"
|
|
3493
4929
|
],
|
|
3494
|
-
"version": "1.
|
|
4930
|
+
"version": "1.1",
|
|
3495
4931
|
"status": "activated",
|
|
3496
4932
|
"tags": [
|
|
3497
4933
|
"Common",
|
|
3498
4934
|
"readability",
|
|
3499
4935
|
"code-quality"
|
|
3500
4936
|
],
|
|
3501
|
-
"tools": [
|
|
4937
|
+
"tools": [
|
|
4938
|
+
"Manual Review"
|
|
4939
|
+
],
|
|
3502
4940
|
"framework": "All",
|
|
3503
|
-
"principles": [
|
|
3504
|
-
"CODE_QUALITY"
|
|
3505
|
-
]
|
|
4941
|
+
"principles": []
|
|
3506
4942
|
},
|
|
3507
|
-
"
|
|
3508
|
-
"name": "
|
|
3509
|
-
"description": "
|
|
3510
|
-
"category": "
|
|
4943
|
+
"RB042": {
|
|
4944
|
+
"name": "Minimize custom JavaScript with Hotwire/Turbo 2.0",
|
|
4945
|
+
"description": "Focus on the Rails \"Majestic Monolith\" approach for better maintainability.",
|
|
4946
|
+
"category": "Backend",
|
|
3511
4947
|
"severity": "major",
|
|
3512
4948
|
"languages": [
|
|
3513
|
-
"
|
|
4949
|
+
"Rails 7+"
|
|
3514
4950
|
],
|
|
3515
|
-
"version": "1.
|
|
4951
|
+
"version": "1.1",
|
|
3516
4952
|
"status": "activated",
|
|
3517
4953
|
"tags": [
|
|
3518
4954
|
"Common",
|
|
3519
4955
|
"readability",
|
|
3520
4956
|
"code-quality"
|
|
3521
4957
|
],
|
|
3522
|
-
"tools": [
|
|
4958
|
+
"tools": [
|
|
4959
|
+
"Manual Review"
|
|
4960
|
+
],
|
|
3523
4961
|
"framework": "All",
|
|
3524
|
-
"principles": [
|
|
3525
|
-
"CODE_QUALITY",
|
|
3526
|
-
"DESIGN_PATTERNS"
|
|
3527
|
-
]
|
|
4962
|
+
"principles": []
|
|
3528
4963
|
},
|
|
3529
|
-
"
|
|
3530
|
-
"name": "
|
|
3531
|
-
"description": "
|
|
3532
|
-
"category": "
|
|
3533
|
-
"severity": "
|
|
4964
|
+
"RB043": {
|
|
4965
|
+
"name": "Use Propshaft as the default asset pipeline",
|
|
4966
|
+
"description": "Use the modern, simplified asset pipeline instead of Sprockets.",
|
|
4967
|
+
"category": "Backend",
|
|
4968
|
+
"severity": "minor",
|
|
3534
4969
|
"languages": [
|
|
3535
|
-
"
|
|
4970
|
+
"Rails 7+"
|
|
3536
4971
|
],
|
|
3537
|
-
"version": "1.
|
|
4972
|
+
"version": "1.1",
|
|
3538
4973
|
"status": "activated",
|
|
3539
4974
|
"tags": [
|
|
3540
4975
|
"Common",
|
|
3541
4976
|
"readability",
|
|
3542
4977
|
"code-quality"
|
|
3543
4978
|
],
|
|
3544
|
-
"tools": [
|
|
4979
|
+
"tools": [
|
|
4980
|
+
"Manual Review"
|
|
4981
|
+
],
|
|
3545
4982
|
"framework": "All",
|
|
3546
|
-
"principles": [
|
|
3547
|
-
"DESIGN_PATTERNS"
|
|
3548
|
-
]
|
|
4983
|
+
"principles": []
|
|
3549
4984
|
},
|
|
3550
|
-
"
|
|
3551
|
-
"name": "
|
|
3552
|
-
"description": "
|
|
3553
|
-
"category": "
|
|
4985
|
+
"RB044": {
|
|
4986
|
+
"name": "Use Structured Logging for Observability",
|
|
4987
|
+
"description": "Improve log parsing and searching in production environments.",
|
|
4988
|
+
"category": "Backend",
|
|
3554
4989
|
"severity": "major",
|
|
3555
4990
|
"languages": [
|
|
3556
|
-
"
|
|
4991
|
+
"ruby"
|
|
3557
4992
|
],
|
|
3558
|
-
"version": "1.
|
|
4993
|
+
"version": "1.1",
|
|
3559
4994
|
"status": "activated",
|
|
3560
4995
|
"tags": [
|
|
3561
4996
|
"Common",
|
|
3562
4997
|
"readability",
|
|
3563
4998
|
"code-quality"
|
|
3564
4999
|
],
|
|
3565
|
-
"tools": [
|
|
5000
|
+
"tools": [
|
|
5001
|
+
"Lograge gem"
|
|
5002
|
+
],
|
|
3566
5003
|
"framework": "All",
|
|
3567
|
-
"principles": [
|
|
3568
|
-
"DESIGN_PATTERNS"
|
|
3569
|
-
]
|
|
5004
|
+
"principles": []
|
|
3570
5005
|
},
|
|
3571
|
-
"
|
|
3572
|
-
"name": "
|
|
3573
|
-
"description": "
|
|
3574
|
-
"category": "
|
|
3575
|
-
"severity": "
|
|
5006
|
+
"RB045": {
|
|
5007
|
+
"name": "Use Prism as the default parser for tooling",
|
|
5008
|
+
"description": "Leverage the faster, more accurate Ruby parser.",
|
|
5009
|
+
"category": "Backend",
|
|
5010
|
+
"severity": "minor",
|
|
3576
5011
|
"languages": [
|
|
3577
|
-
"
|
|
5012
|
+
"ruby"
|
|
3578
5013
|
],
|
|
3579
|
-
"version": "1.
|
|
5014
|
+
"version": "1.1",
|
|
3580
5015
|
"status": "activated",
|
|
3581
5016
|
"tags": [
|
|
3582
5017
|
"Common",
|
|
3583
5018
|
"readability",
|
|
3584
5019
|
"code-quality"
|
|
3585
5020
|
],
|
|
3586
|
-
"tools": [
|
|
5021
|
+
"tools": [
|
|
5022
|
+
"RuboCop (`ParserEngine: prism`)"
|
|
5023
|
+
],
|
|
3587
5024
|
"framework": "All",
|
|
3588
|
-
"principles": [
|
|
3589
|
-
"DESIGN_PATTERNS"
|
|
3590
|
-
]
|
|
5025
|
+
"principles": []
|
|
3591
5026
|
},
|
|
3592
5027
|
"S001": {
|
|
3593
5028
|
"name": "Authenticate backend component communications securely",
|
|
3594
5029
|
"description": "Ensure all communications between backend components (APIs, middleware, data layers) are authenticated using secure, short-lived credentials instead of static secrets.",
|
|
3595
|
-
"category": "
|
|
5030
|
+
"category": "Security",
|
|
3596
5031
|
"severity": "critical",
|
|
3597
5032
|
"languages": [
|
|
3598
5033
|
"All languages"
|
|
@@ -3619,7 +5054,7 @@
|
|
|
3619
5054
|
"S002": {
|
|
3620
5055
|
"name": "Protect against OS command injection",
|
|
3621
5056
|
"description": "Prevent OS command injection attacks by ensuring all operating system calls use parameterized queries or proper output encoding.",
|
|
3622
|
-
"category": "
|
|
5057
|
+
"category": "Security",
|
|
3623
5058
|
"severity": "critical",
|
|
3624
5059
|
"languages": [
|
|
3625
5060
|
"All languages"
|
|
@@ -3648,7 +5083,7 @@
|
|
|
3648
5083
|
"S003": {
|
|
3649
5084
|
"name": "URL redirects must be within an allow list",
|
|
3650
5085
|
"description": "Prevent Open Redirect vulnerabilities, protecting users from being redirected to malicious pages through spoofed input.",
|
|
3651
|
-
"category": "
|
|
5086
|
+
"category": "Security",
|
|
3652
5087
|
"severity": "major",
|
|
3653
5088
|
"languages": [
|
|
3654
5089
|
"All languages"
|
|
@@ -3673,7 +5108,7 @@
|
|
|
3673
5108
|
"S004": {
|
|
3674
5109
|
"name": "Do not log login credentials, payment information, and unencrypted tokens",
|
|
3675
5110
|
"description": "Prevent leakage of sensitive information through log systems – a common attack vector if logs are shared, stored incorrectly, or exploited.",
|
|
3676
|
-
"category": "
|
|
5111
|
+
"category": "Security",
|
|
3677
5112
|
"severity": "major",
|
|
3678
5113
|
"languages": [
|
|
3679
5114
|
"All languages"
|
|
@@ -3700,7 +5135,7 @@
|
|
|
3700
5135
|
"S005": {
|
|
3701
5136
|
"name": "Enforce authorization at trusted service layer",
|
|
3702
5137
|
"description": "Ensure authorization rules are enforced at a trusted server-side service layer, not relying on client-side controls that can be manipulated.",
|
|
3703
|
-
"category": "
|
|
5138
|
+
"category": "Security",
|
|
3704
5139
|
"severity": "critical",
|
|
3705
5140
|
"languages": [
|
|
3706
5141
|
"All languages"
|
|
@@ -3727,7 +5162,7 @@
|
|
|
3727
5162
|
"S006": {
|
|
3728
5163
|
"name": "Do not use default credentials for service authentication",
|
|
3729
5164
|
"description": "Ensure service authentication never uses default or well-known credentials that attackers can easily guess or find in documentation.",
|
|
3730
|
-
"category": "
|
|
5165
|
+
"category": "Security",
|
|
3731
5166
|
"severity": "critical",
|
|
3732
5167
|
"languages": [
|
|
3733
5168
|
"All languages"
|
|
@@ -3755,7 +5190,7 @@
|
|
|
3755
5190
|
"S007": {
|
|
3756
5191
|
"name": "Perform output encoding before interpreter use",
|
|
3757
5192
|
"description": "Ensure the application performs proper output encoding and escaping as a final step before data is used by the target interpreter, preventing injection attacks.",
|
|
3758
|
-
"category": "
|
|
5193
|
+
"category": "Security",
|
|
3759
5194
|
"severity": "major",
|
|
3760
5195
|
"languages": [
|
|
3761
5196
|
"All languages"
|
|
@@ -3783,7 +5218,7 @@
|
|
|
3783
5218
|
"S008": {
|
|
3784
5219
|
"name": "Validate and sanitize SVG content",
|
|
3785
5220
|
"description": "Ensure user-supplied SVG (Scalable Vector Graphics) content is validated or sanitized to prevent script injection and other attacks.",
|
|
3786
|
-
"category": "
|
|
5221
|
+
"category": "Security",
|
|
3787
5222
|
"severity": "major",
|
|
3788
5223
|
"languages": [
|
|
3789
5224
|
"All languages"
|
|
@@ -3810,7 +5245,7 @@
|
|
|
3810
5245
|
"S009": {
|
|
3811
5246
|
"name": "Use only approved cryptographic algorithms, modes, and hash functions",
|
|
3812
5247
|
"description": "Prevent cryptographic vulnerabilities by ensuring only secure block modes, padding schemes, ciphers, and hash functions are used throughout the application.",
|
|
3813
|
-
"category": "
|
|
5248
|
+
"category": "Security",
|
|
3814
5249
|
"severity": "major",
|
|
3815
5250
|
"languages": [
|
|
3816
5251
|
"All languages"
|
|
@@ -3838,7 +5273,7 @@
|
|
|
3838
5273
|
"S010": {
|
|
3839
5274
|
"name": "Must use cryptographically secure random number generators (CSPRNG) for security purposes",
|
|
3840
5275
|
"description": "Prevent attackers from guessing security random values like OTP, session ID, recovery tokens... by ensuring they are generated from Cryptographically Secure PRNG provided by cryptographic libraries/modules.",
|
|
3841
|
-
"category": "
|
|
5276
|
+
"category": "Security",
|
|
3842
5277
|
"severity": "major",
|
|
3843
5278
|
"languages": [
|
|
3844
5279
|
"All languages"
|
|
@@ -3864,7 +5299,7 @@
|
|
|
3864
5299
|
"S011": {
|
|
3865
5300
|
"name": "Enable Encrypted Client Hello (ECH) for TLS",
|
|
3866
5301
|
"description": "Prevent exposure of sensitive metadata during TLS handshake by enabling Encrypted Client Hello (ECH) to protect Server Name Indication (SNI) and other client hello fields.",
|
|
3867
|
-
"category": "
|
|
5302
|
+
"category": "Security",
|
|
3868
5303
|
"severity": "major",
|
|
3869
5304
|
"languages": [
|
|
3870
5305
|
"All languages"
|
|
@@ -3890,7 +5325,7 @@
|
|
|
3890
5325
|
"S012": {
|
|
3891
5326
|
"name": "Use secrets management solution for backend secrets",
|
|
3892
5327
|
"description": "Ensure all backend secrets are securely managed using a dedicated secrets management solution, never stored in source code or build artifacts.",
|
|
3893
|
-
"category": "
|
|
5328
|
+
"category": "Security",
|
|
3894
5329
|
"severity": "critical",
|
|
3895
5330
|
"languages": [
|
|
3896
5331
|
"All languages"
|
|
@@ -3919,7 +5354,7 @@
|
|
|
3919
5354
|
"S013": {
|
|
3920
5355
|
"name": "Always use TLS for all connections",
|
|
3921
5356
|
"description": "Protect data in transit from leakage and Man-In-The-Middle (MITM) attacks by requiring all connections to use TLS (HTTPS), not allowing fallback to unencrypted protocols like HTTP.",
|
|
3922
|
-
"category": "
|
|
5357
|
+
"category": "Security",
|
|
3923
5358
|
"severity": "major",
|
|
3924
5359
|
"languages": [
|
|
3925
5360
|
"All languages"
|
|
@@ -3948,7 +5383,7 @@
|
|
|
3948
5383
|
"S014": {
|
|
3949
5384
|
"name": "Only use TLS 1.2 or 1.3",
|
|
3950
5385
|
"description": "Protect network communication from attacks exploiting older TLS versions like BEAST, POODLE, Heartbleed, or downgrade attacks by only allowing TLS 1.2 or 1.3.",
|
|
3951
|
-
"category": "
|
|
5386
|
+
"category": "Security",
|
|
3952
5387
|
"severity": "major",
|
|
3953
5388
|
"languages": [
|
|
3954
5389
|
"All languages"
|
|
@@ -3976,7 +5411,7 @@
|
|
|
3976
5411
|
"S015": {
|
|
3977
5412
|
"name": "Only accept trusted TLS certificates and eliminate weak ciphers",
|
|
3978
5413
|
"description": "Protect client-server connections from MITM attacks by only trusting valid TLS certificates signed by trusted CAs, and rejecting all unknown certificates or weak ciphers.",
|
|
3979
|
-
"category": "
|
|
5414
|
+
"category": "Security",
|
|
3980
5415
|
"severity": "major",
|
|
3981
5416
|
"languages": [
|
|
3982
5417
|
"All languages"
|
|
@@ -4002,7 +5437,7 @@
|
|
|
4002
5437
|
"S016": {
|
|
4003
5438
|
"name": "Do not pass sensitive data via query string",
|
|
4004
5439
|
"description": "Prevent leakage of sensitive data through URLs by not passing sensitive information via query string, instead using HTTP body or headers in authenticated requests or private operations.",
|
|
4005
|
-
"category": "
|
|
5440
|
+
"category": "Security",
|
|
4006
5441
|
"severity": "major",
|
|
4007
5442
|
"languages": [
|
|
4008
5443
|
"All languages"
|
|
@@ -4028,7 +5463,7 @@
|
|
|
4028
5463
|
"S017": {
|
|
4029
5464
|
"name": "Always use parameterized queries",
|
|
4030
5465
|
"description": "Prevent various forms of injection (SQL Injection, HQL Injection, NoSQL Injection) by always using parameterized queries or ORM when accessing data.",
|
|
4031
|
-
"category": "
|
|
5466
|
+
"category": "Security",
|
|
4032
5467
|
"severity": "critical",
|
|
4033
5468
|
"languages": [
|
|
4034
5469
|
"All languages"
|
|
@@ -4056,7 +5491,7 @@
|
|
|
4056
5491
|
"S018": {
|
|
4057
5492
|
"name": "Do not store sensitive data in browser storage",
|
|
4058
5493
|
"description": "Prevent sensitive data exposure by ensuring browser storage mechanisms do not contain sensitive information, except for session tokens.",
|
|
4059
|
-
"category": "
|
|
5494
|
+
"category": "Security",
|
|
4060
5495
|
"severity": "major",
|
|
4061
5496
|
"languages": [
|
|
4062
5497
|
"All languages"
|
|
@@ -4084,7 +5519,7 @@
|
|
|
4084
5519
|
"S019": {
|
|
4085
5520
|
"name": "Sanitize input before sending emails to prevent SMTP Injection",
|
|
4086
5521
|
"description": "Prevent SMTP/IMAP injection by removing control characters and ensuring proper formatting of user input used in email sending.",
|
|
4087
|
-
"category": "
|
|
5522
|
+
"category": "Security",
|
|
4088
5523
|
"severity": "major",
|
|
4089
5524
|
"languages": [
|
|
4090
5525
|
"All languages"
|
|
@@ -4110,7 +5545,7 @@
|
|
|
4110
5545
|
"S020": {
|
|
4111
5546
|
"name": "Avoid using `eval()` or executing dynamic code",
|
|
4112
5547
|
"description": "Prevent Remote Code Execution (RCE) by disallowing use of dynamic code execution functions like `eval()`, `Function()`, `exec()`, `Runtime.exec()` with user-controlled input.",
|
|
4113
|
-
"category": "
|
|
5548
|
+
"category": "Security",
|
|
4114
5549
|
"severity": "major",
|
|
4115
5550
|
"languages": [
|
|
4116
5551
|
"All languages"
|
|
@@ -4136,7 +5571,7 @@
|
|
|
4136
5571
|
"S021": {
|
|
4137
5572
|
"name": "Set Referrer-Policy to prevent sensitive data leakage",
|
|
4138
5573
|
"description": "Prevent leakage of sensitive URL data (path, query parameters, hostname) to third-party services via the `Referer` HTTP header.",
|
|
4139
|
-
"category": "
|
|
5574
|
+
"category": "Security",
|
|
4140
5575
|
"severity": "major",
|
|
4141
5576
|
"languages": [
|
|
4142
5577
|
"All languages"
|
|
@@ -4163,7 +5598,7 @@
|
|
|
4163
5598
|
"S022": {
|
|
4164
5599
|
"name": "Escape data properly based on output context",
|
|
4165
5600
|
"description": "Prevent XSS, Header Injection, Email Injection by escaping output data according to context (HTML, JS, URL, Header, Email, etc).",
|
|
4166
|
-
"category": "
|
|
5601
|
+
"category": "Security",
|
|
4167
5602
|
"severity": "major",
|
|
4168
5603
|
"languages": [
|
|
4169
5604
|
"All languages"
|
|
@@ -4192,7 +5627,7 @@
|
|
|
4192
5627
|
"S023": {
|
|
4193
5628
|
"name": "Use output encoding when building dynamic JavaScript/JSON",
|
|
4194
5629
|
"description": "Prevent JavaScript and JSON injection by applying proper output encoding when dynamically building JavaScript content or JSON data.",
|
|
4195
|
-
"category": "
|
|
5630
|
+
"category": "Security",
|
|
4196
5631
|
"severity": "major",
|
|
4197
5632
|
"languages": [
|
|
4198
5633
|
"All languages"
|
|
@@ -4220,7 +5655,7 @@
|
|
|
4220
5655
|
"S024": {
|
|
4221
5656
|
"name": "Protect against XPath Injection and XML External Entity (XXE)",
|
|
4222
5657
|
"description": "Prevent XPath injection and XXE vulnerabilities that can expose files, trigger SSRF, or run malicious code.",
|
|
4223
|
-
"category": "
|
|
5658
|
+
"category": "Security",
|
|
4224
5659
|
"severity": "major",
|
|
4225
5660
|
"languages": [
|
|
4226
5661
|
"All languages"
|
|
@@ -4246,7 +5681,7 @@
|
|
|
4246
5681
|
"S025": {
|
|
4247
5682
|
"name": "Always validate client-side data on the server",
|
|
4248
5683
|
"description": "Ensure all data from clients is validated server-side to prevent attacks from forged or malicious input.",
|
|
4249
|
-
"category": "
|
|
5684
|
+
"category": "Security",
|
|
4250
5685
|
"severity": "major",
|
|
4251
5686
|
"languages": [
|
|
4252
5687
|
"All languages"
|
|
@@ -4273,7 +5708,7 @@
|
|
|
4273
5708
|
"S026": {
|
|
4274
5709
|
"name": "Use TLS encryption for all inbound and outbound connections",
|
|
4275
5710
|
"description": "Ensure all application connections use encrypted TLS protocol, with no fallback to insecure or unencrypted protocols.",
|
|
4276
|
-
"category": "
|
|
5711
|
+
"category": "Security",
|
|
4277
5712
|
"severity": "critical",
|
|
4278
5713
|
"languages": [
|
|
4279
5714
|
"All languages"
|
|
@@ -4301,7 +5736,7 @@
|
|
|
4301
5736
|
"S027": {
|
|
4302
5737
|
"name": "Validate mTLS client certificates before authentication",
|
|
4303
5738
|
"description": "Ensure mTLS client certificates are properly validated and trusted before using certificate identity for authentication or authorization decisions.",
|
|
4304
|
-
"category": "
|
|
5739
|
+
"category": "Security",
|
|
4305
5740
|
"severity": "critical",
|
|
4306
5741
|
"languages": [
|
|
4307
5742
|
"All languages"
|
|
@@ -4328,7 +5763,7 @@
|
|
|
4328
5763
|
"S028": {
|
|
4329
5764
|
"name": "Limit upload file size and number of files per user",
|
|
4330
5765
|
"description": "Prevent resource abuse and protect against DoS attacks by limiting file size, number of files, and user storage usage.",
|
|
4331
|
-
"category": "
|
|
5766
|
+
"category": "Security",
|
|
4332
5767
|
"severity": "major",
|
|
4333
5768
|
"languages": [
|
|
4334
5769
|
"All languages"
|
|
@@ -4357,7 +5792,7 @@
|
|
|
4357
5792
|
"S029": {
|
|
4358
5793
|
"name": "Apply CSRF protection for authentication-related features",
|
|
4359
5794
|
"description": "Prevent Cross-Site Request Forgery (CSRF) attacks where an attacker triggers unauthorized actions using the victim's authenticated session.",
|
|
4360
|
-
"category": "
|
|
5795
|
+
"category": "Security",
|
|
4361
5796
|
"severity": "major",
|
|
4362
5797
|
"languages": [
|
|
4363
5798
|
"All languages"
|
|
@@ -4386,7 +5821,7 @@
|
|
|
4386
5821
|
"S030": {
|
|
4387
5822
|
"name": "Disable directory browsing and protect sensitive metadata files",
|
|
4388
5823
|
"description": "Prevent unauthorized access to file listings or metadata files such as `.git`, `.env`, `.DS_Store`, which can reveal sensitive system or source code information.",
|
|
4389
|
-
"category": "
|
|
5824
|
+
"category": "Security",
|
|
4390
5825
|
"severity": "major",
|
|
4391
5826
|
"languages": [
|
|
4392
5827
|
"All languages"
|
|
@@ -4414,7 +5849,7 @@
|
|
|
4414
5849
|
"S031": {
|
|
4415
5850
|
"name": "Set the Secure flag on session cookies for HTTPS protection",
|
|
4416
5851
|
"description": "Prevent attackers from stealing session cookies via unencrypted HTTP, especially on public or monitored networks (MITM).",
|
|
4417
|
-
"category": "
|
|
5852
|
+
"category": "Security",
|
|
4418
5853
|
"severity": "major",
|
|
4419
5854
|
"languages": [
|
|
4420
5855
|
"All languages"
|
|
@@ -4441,7 +5876,7 @@
|
|
|
4441
5876
|
"S032": {
|
|
4442
5877
|
"name": "Enable HttpOnly attribute for Session Cookies to prevent JavaScript access",
|
|
4443
5878
|
"description": "Prevent JavaScript (including malicious code during XSS attacks) from accessing session cookies, thereby limiting the risk of theft and session hijacking.",
|
|
4444
|
-
"category": "
|
|
5879
|
+
"category": "Security",
|
|
4445
5880
|
"severity": "major",
|
|
4446
5881
|
"languages": [
|
|
4447
5882
|
"All languages"
|
|
@@ -4468,7 +5903,7 @@
|
|
|
4468
5903
|
"S033": {
|
|
4469
5904
|
"name": "Set SameSite attribute for Session Cookies to reduce CSRF risk",
|
|
4470
5905
|
"description": "Limit the browser's ability to automatically send cookies in cross-origin requests, thereby minimizing the risk of Cross-Site Request Forgery (CSRF) attacks.",
|
|
4471
|
-
"category": "
|
|
5906
|
+
"category": "Security",
|
|
4472
5907
|
"severity": "major",
|
|
4473
5908
|
"languages": [
|
|
4474
5909
|
"All languages"
|
|
@@ -4496,7 +5931,7 @@
|
|
|
4496
5931
|
"S034": {
|
|
4497
5932
|
"name": "Use `__Host-` prefix for Session Cookies to prevent subdomain sharing",
|
|
4498
5933
|
"description": "Prevent cookie theft between subdomains (e.g., `api.example.com` accessing cookies from `admin.example.com`) by using cookies prefixed with `__Host-`, which enforce strict security tied to the root domain.",
|
|
4499
|
-
"category": "
|
|
5934
|
+
"category": "Security",
|
|
4500
5935
|
"severity": "major",
|
|
4501
5936
|
"languages": [
|
|
4502
5937
|
"All languages"
|
|
@@ -4523,7 +5958,7 @@
|
|
|
4523
5958
|
"S035": {
|
|
4524
5959
|
"name": "Host separate applications on different hostnames",
|
|
4525
5960
|
"description": "Leverage same-origin policy restrictions by hosting separate applications on different hostnames to isolate resources, cookies, and prevent cross-application attacks.",
|
|
4526
|
-
"category": "
|
|
5961
|
+
"category": "Security",
|
|
4527
5962
|
"severity": "major",
|
|
4528
5963
|
"languages": [
|
|
4529
5964
|
"All languages"
|
|
@@ -4549,7 +5984,7 @@
|
|
|
4549
5984
|
"S036": {
|
|
4550
5985
|
"name": "Use internal data for file paths, validate user filenames strictly",
|
|
4551
5986
|
"description": "Prevent path traversal, LFI, RFI, and SSRF attacks by using internally generated file paths instead of user-submitted filenames, with strict validation when user input is unavoidable.",
|
|
4552
|
-
"category": "
|
|
5987
|
+
"category": "Security",
|
|
4553
5988
|
"severity": "critical",
|
|
4554
5989
|
"languages": [
|
|
4555
5990
|
"All languages"
|
|
@@ -4577,7 +6012,7 @@
|
|
|
4577
6012
|
"S037": {
|
|
4578
6013
|
"name": "Set anti-cache headers to prevent sensitive data leakage",
|
|
4579
6014
|
"description": "Prevent browsers from caching sensitive data such as tokens, personal information, or financial content which could leak when users share devices or use back/forward navigation.",
|
|
4580
|
-
"category": "
|
|
6015
|
+
"category": "Security",
|
|
4581
6016
|
"severity": "major",
|
|
4582
6017
|
"languages": [
|
|
4583
6018
|
"All languages"
|
|
@@ -4604,7 +6039,7 @@
|
|
|
4604
6039
|
"S038": {
|
|
4605
6040
|
"name": "Hide system version information in HTTP Headers",
|
|
4606
6041
|
"description": "Prevent attackers from discovering backend technologies (e.g., server, framework, OS) via HTTP response headers that can be used to target known vulnerabilities.",
|
|
4607
|
-
"category": "
|
|
6042
|
+
"category": "Security",
|
|
4608
6043
|
"severity": "major",
|
|
4609
6044
|
"languages": [
|
|
4610
6045
|
"All languages"
|
|
@@ -4632,7 +6067,7 @@
|
|
|
4632
6067
|
"S039": {
|
|
4633
6068
|
"name": "TLS clients must validate server certificates",
|
|
4634
6069
|
"description": "Ensure TLS clients validate certificates received from servers before establishing secure communication to prevent MITM attacks.",
|
|
4635
|
-
"category": "
|
|
6070
|
+
"category": "Security",
|
|
4636
6071
|
"severity": "critical",
|
|
4637
6072
|
"languages": [
|
|
4638
6073
|
"All languages"
|
|
@@ -4659,7 +6094,7 @@
|
|
|
4659
6094
|
"S040": {
|
|
4660
6095
|
"name": "Regenerate Session Token after login to prevent Session Fixation",
|
|
4661
6096
|
"description": "Prevent attackers from setting a session ID before login and taking over the session post-login if the ID remains unchanged.",
|
|
4662
|
-
"category": "
|
|
6097
|
+
"category": "Security",
|
|
4663
6098
|
"severity": "major",
|
|
4664
6099
|
"languages": [
|
|
4665
6100
|
"All languages"
|
|
@@ -4686,7 +6121,7 @@
|
|
|
4686
6121
|
"S041": {
|
|
4687
6122
|
"name": "Session Tokens must be invalidated after logout or expiration",
|
|
4688
6123
|
"description": "Prevent users from reusing old session tokens after logout or timeout, which could lead to session hijacking.",
|
|
4689
|
-
"category": "
|
|
6124
|
+
"category": "Security",
|
|
4690
6125
|
"severity": "major",
|
|
4691
6126
|
"languages": [
|
|
4692
6127
|
"All languages"
|
|
@@ -4714,7 +6149,7 @@
|
|
|
4714
6149
|
"S042": {
|
|
4715
6150
|
"name": "Require re-authentication for long-lived sessions or sensitive actions",
|
|
4716
6151
|
"description": "Reduce the risk of session hijacking or privilege misuse by forcing re-authentication after long idle periods or before critical actions.",
|
|
4717
|
-
"category": "
|
|
6152
|
+
"category": "Security",
|
|
4718
6153
|
"severity": "major",
|
|
4719
6154
|
"languages": [
|
|
4720
6155
|
"All languages"
|
|
@@ -4742,7 +6177,7 @@
|
|
|
4742
6177
|
"S043": {
|
|
4743
6178
|
"name": "Password changes must invalidate all other login sessions",
|
|
4744
6179
|
"description": "Ensure attackers cannot continue using old session tokens after a password change. Enforce correct access control after sensitive updates.",
|
|
4745
|
-
"category": "
|
|
6180
|
+
"category": "Security",
|
|
4746
6181
|
"severity": "major",
|
|
4747
6182
|
"languages": [
|
|
4748
6183
|
"All languages"
|
|
@@ -4768,7 +6203,7 @@
|
|
|
4768
6203
|
"S044": {
|
|
4769
6204
|
"name": "Require re-authentication before modifying critical information",
|
|
4770
6205
|
"description": "Prevent unauthorized changes to critical information when the session is not fully authenticated. Protect users in half-open session states.",
|
|
4771
|
-
"category": "
|
|
6206
|
+
"category": "Security",
|
|
4772
6207
|
"severity": "major",
|
|
4773
6208
|
"languages": [
|
|
4774
6209
|
"All languages"
|
|
@@ -4795,7 +6230,7 @@
|
|
|
4795
6230
|
"S045": {
|
|
4796
6231
|
"name": "Implement brute-force protection for login",
|
|
4797
6232
|
"description": "Prevent brute-force and credential stuffing attacks by limiting failed login attempts and introducing friction for suspicious behavior.",
|
|
4798
|
-
"category": "
|
|
6233
|
+
"category": "Security",
|
|
4799
6234
|
"severity": "major",
|
|
4800
6235
|
"languages": [
|
|
4801
6236
|
"All languages"
|
|
@@ -4823,7 +6258,7 @@
|
|
|
4823
6258
|
"S046": {
|
|
4824
6259
|
"name": "Use algorithm allowlist for self-contained tokens",
|
|
4825
6260
|
"description": "Prevent algorithm confusion and downgrade attacks by restricting token signing/verification to an explicit allowlist of algorithms.",
|
|
4826
|
-
"category": "
|
|
6261
|
+
"category": "Security",
|
|
4827
6262
|
"severity": "critical",
|
|
4828
6263
|
"languages": [
|
|
4829
6264
|
"All languages"
|
|
@@ -4850,7 +6285,7 @@
|
|
|
4850
6285
|
"S047": {
|
|
4851
6286
|
"name": "Protect OAuth code flow against CSRF attacks",
|
|
4852
6287
|
"description": "Prevent browser-based CSRF attacks that could trigger unauthorized OAuth token requests by implementing PKCE or state parameter validation.",
|
|
4853
|
-
"category": "
|
|
6288
|
+
"category": "Security",
|
|
4854
6289
|
"severity": "major",
|
|
4855
6290
|
"languages": [
|
|
4856
6291
|
"All languages"
|
|
@@ -4876,7 +6311,7 @@
|
|
|
4876
6311
|
"S048": {
|
|
4877
6312
|
"name": "Validate OAuth redirect URIs with exact string comparison",
|
|
4878
6313
|
"description": "Prevent OAuth redirect attacks by validating redirect URIs against a client-specific allowlist using exact string comparison, not pattern matching.",
|
|
4879
|
-
"category": "
|
|
6314
|
+
"category": "Security",
|
|
4880
6315
|
"severity": "critical",
|
|
4881
6316
|
"languages": [
|
|
4882
6317
|
"All languages"
|
|
@@ -4902,7 +6337,7 @@
|
|
|
4902
6337
|
"S049": {
|
|
4903
6338
|
"name": "Authentication codes must expire quickly",
|
|
4904
6339
|
"description": "Ensure that OTPs, reset tokens, and activation links expire quickly to reduce risk of interception or reuse.",
|
|
4905
|
-
"category": "
|
|
6340
|
+
"category": "Security",
|
|
4906
6341
|
"severity": "major",
|
|
4907
6342
|
"languages": [
|
|
4908
6343
|
"All languages"
|
|
@@ -4928,7 +6363,7 @@
|
|
|
4928
6363
|
"S050": {
|
|
4929
6364
|
"name": "Reference tokens must be unique with 128-bit entropy using CSPRNG",
|
|
4930
6365
|
"description": "Ensure reference tokens (session tokens, opaque tokens) are unpredictable and resistant to brute-force attacks by using cryptographically secure generation.",
|
|
4931
|
-
"category": "
|
|
6366
|
+
"category": "Security",
|
|
4932
6367
|
"severity": "major",
|
|
4933
6368
|
"languages": [
|
|
4934
6369
|
"All languages"
|
|
@@ -4955,7 +6390,7 @@
|
|
|
4955
6390
|
"S051": {
|
|
4956
6391
|
"name": "Support 12–64 character passwords; reject >128 characters",
|
|
4957
6392
|
"description": "Allow users to use strong passphrases while preventing resource abuse from excessively long inputs.",
|
|
4958
|
-
"category": "
|
|
6393
|
+
"category": "Security",
|
|
4959
6394
|
"severity": "major",
|
|
4960
6395
|
"languages": [
|
|
4961
6396
|
"All languages"
|
|
@@ -4982,7 +6417,7 @@
|
|
|
4982
6417
|
"S052": {
|
|
4983
6418
|
"name": "OTPs must have at least 20-bit entropy",
|
|
4984
6419
|
"description": "Ensure OTPs are strong enough to resist brute-force or statistical guessing attacks.",
|
|
4985
|
-
"category": "
|
|
6420
|
+
"category": "Security",
|
|
4986
6421
|
"severity": "major",
|
|
4987
6422
|
"languages": [
|
|
4988
6423
|
"All languages"
|
|
@@ -5009,7 +6444,7 @@
|
|
|
5009
6444
|
"S053": {
|
|
5010
6445
|
"name": "Return generic error messages, hide internal details",
|
|
5011
6446
|
"description": "Prevent exposure of sensitive internal system data by returning generic error messages to consumers when unexpected or security-sensitive errors occur.",
|
|
5012
|
-
"category": "
|
|
6447
|
+
"category": "Security",
|
|
5013
6448
|
"severity": "major",
|
|
5014
6449
|
"languages": [
|
|
5015
6450
|
"All languages"
|
|
@@ -5036,7 +6471,7 @@
|
|
|
5036
6471
|
"S054": {
|
|
5037
6472
|
"name": "Avoid using default accounts like \"admin\", \"root\", \"sa\"",
|
|
5038
6473
|
"description": "Prevent brute-force attacks and ensure traceability and accountability in auditing. Avoid predictable, shared accounts lacking identity association.",
|
|
5039
|
-
"category": "
|
|
6474
|
+
"category": "Security",
|
|
5040
6475
|
"severity": "major",
|
|
5041
6476
|
"languages": [
|
|
5042
6477
|
"All languages"
|
|
@@ -5063,7 +6498,7 @@
|
|
|
5063
6498
|
"S055": {
|
|
5064
6499
|
"name": "Validate input Content-Type in REST services",
|
|
5065
6500
|
"description": "Prevent attacks via malformed or improperly handled data by validating incoming data format (e.g., JSON, XML).",
|
|
5066
|
-
"category": "
|
|
6501
|
+
"category": "Security",
|
|
5067
6502
|
"severity": "major",
|
|
5068
6503
|
"languages": [
|
|
5069
6504
|
"All languages"
|
|
@@ -5089,7 +6524,7 @@
|
|
|
5089
6524
|
"S056": {
|
|
5090
6525
|
"name": "Protect against Log Injection attacks",
|
|
5091
6526
|
"description": "Prevent attackers from injecting fake log entries that distort tracking or exploit log analysis systems.",
|
|
5092
|
-
"category": "
|
|
6527
|
+
"category": "Security",
|
|
5093
6528
|
"severity": "major",
|
|
5094
6529
|
"languages": [
|
|
5095
6530
|
"All languages"
|
|
@@ -5115,7 +6550,7 @@
|
|
|
5115
6550
|
"S057": {
|
|
5116
6551
|
"name": "Use synchronized time and UTC in logs",
|
|
5117
6552
|
"description": "Ensure consistent, accurate log timestamps to support auditing, investigation, and cross-system comparison.",
|
|
5118
|
-
"category": "
|
|
6553
|
+
"category": "Security",
|
|
5119
6554
|
"severity": "major",
|
|
5120
6555
|
"languages": [
|
|
5121
6556
|
"All languages"
|
|
@@ -5144,7 +6579,7 @@
|
|
|
5144
6579
|
"S058": {
|
|
5145
6580
|
"name": "Protect applications from SSRF attacks",
|
|
5146
6581
|
"description": "Prevent Server-Side Request Forgery (SSRF) and protect internal networks or cloud metadata services from unauthorized access via untrusted input.",
|
|
5147
|
-
"category": "
|
|
6582
|
+
"category": "Security",
|
|
5148
6583
|
"severity": "major",
|
|
5149
6584
|
"languages": [
|
|
5150
6585
|
"All languages"
|
|
@@ -5169,7 +6604,7 @@
|
|
|
5169
6604
|
"S059": {
|
|
5170
6605
|
"name": "Disable debug modes in production environments",
|
|
5171
6606
|
"description": "Prevent exposure of debugging features and information leakage by ensuring all debug modes are disabled in production environments.",
|
|
5172
|
-
"category": "
|
|
6607
|
+
"category": "Security",
|
|
5173
6608
|
"severity": "major",
|
|
5174
6609
|
"languages": [
|
|
5175
6610
|
"All languages"
|
|
@@ -5196,7 +6631,7 @@
|
|
|
5196
6631
|
"S060": {
|
|
5197
6632
|
"name": "Enforce minimum password length of 8 characters, recommend 15+",
|
|
5198
6633
|
"description": "Ensure user-set passwords meet minimum length requirements to provide adequate security against brute-force and dictionary attacks.",
|
|
5199
|
-
"category": "
|
|
6634
|
+
"category": "Security",
|
|
5200
6635
|
"severity": "major",
|
|
5201
6636
|
"languages": [
|
|
5202
6637
|
"All languages"
|
|
@@ -5223,7 +6658,7 @@
|
|
|
5223
6658
|
"SW001": {
|
|
5224
6659
|
"name": "Use Swift's observe property instead of legacy KVO",
|
|
5225
6660
|
"description": "Avoid using outdated KVO mechanisms.",
|
|
5226
|
-
"category": "
|
|
6661
|
+
"category": "Security",
|
|
5227
6662
|
"severity": "major",
|
|
5228
6663
|
"languages": [
|
|
5229
6664
|
"swift"
|
|
@@ -5246,7 +6681,7 @@
|
|
|
5246
6681
|
"SW002": {
|
|
5247
6682
|
"name": "Delegate Protocols must be class-only",
|
|
5248
6683
|
"description": "Allow the use of `weak` to avoid retain cycles (memory leaks).",
|
|
5249
|
-
"category": "
|
|
6684
|
+
"category": "Security",
|
|
5250
6685
|
"severity": "major",
|
|
5251
6686
|
"languages": [
|
|
5252
6687
|
"swift"
|
|
@@ -5269,7 +6704,7 @@
|
|
|
5269
6704
|
"SW003": {
|
|
5270
6705
|
"name": "Do not directly instantiate system protocols",
|
|
5271
6706
|
"description": "Avoid misusing protocols like `ExpressibleByArrayLiteral`.",
|
|
5272
|
-
"category": "
|
|
6707
|
+
"category": "Security",
|
|
5273
6708
|
"severity": "major",
|
|
5274
6709
|
"languages": [
|
|
5275
6710
|
"swift"
|
|
@@ -5292,7 +6727,7 @@
|
|
|
5292
6727
|
"SW004": {
|
|
5293
6728
|
"name": "Prefer `.contains` for certain filtering operations",
|
|
5294
6729
|
"description": "Improve performance and clarity.",
|
|
5295
|
-
"category": "
|
|
6730
|
+
"category": "Security",
|
|
5296
6731
|
"severity": "major",
|
|
5297
6732
|
"languages": [
|
|
5298
6733
|
"swift"
|
|
@@ -5316,7 +6751,7 @@
|
|
|
5316
6751
|
"SW005": {
|
|
5317
6752
|
"name": "Use `enum` for types with only static members",
|
|
5318
6753
|
"description": "Prevent unnecessary instantiation.",
|
|
5319
|
-
"category": "
|
|
6754
|
+
"category": "Security",
|
|
5320
6755
|
"severity": "major",
|
|
5321
6756
|
"languages": [
|
|
5322
6757
|
"swift"
|
|
@@ -5339,7 +6774,7 @@
|
|
|
5339
6774
|
"SW006": {
|
|
5340
6775
|
"name": "Always dispose NotificationCenter observers",
|
|
5341
6776
|
"description": "Prevent memory leaks due to retain cycles.",
|
|
5342
|
-
"category": "
|
|
6777
|
+
"category": "Security",
|
|
5343
6778
|
"severity": "major",
|
|
5344
6779
|
"languages": [
|
|
5345
6780
|
"swift"
|
|
@@ -5362,7 +6797,7 @@
|
|
|
5362
6797
|
"SW007": {
|
|
5363
6798
|
"name": "Avoid direct instantiation of system types",
|
|
5364
6799
|
"description": "Prevent creating types that may cause errors or are unnecessary.",
|
|
5365
|
-
"category": "
|
|
6800
|
+
"category": "Security",
|
|
5366
6801
|
"severity": "major",
|
|
5367
6802
|
"languages": [
|
|
5368
6803
|
"swift"
|
|
@@ -5385,7 +6820,7 @@
|
|
|
5385
6820
|
"SW008": {
|
|
5386
6821
|
"name": "Do not use optionals for Boolean values",
|
|
5387
6822
|
"description": "Avoid ambiguous logic and hard-to-control conditions.",
|
|
5388
|
-
"category": "
|
|
6823
|
+
"category": "Security",
|
|
5389
6824
|
"severity": "critical",
|
|
5390
6825
|
"languages": [
|
|
5391
6826
|
"swift"
|
|
@@ -5408,7 +6843,7 @@
|
|
|
5408
6843
|
"SW009": {
|
|
5409
6844
|
"name": "Prefer `.isEmpty` over `.count == 0`",
|
|
5410
6845
|
"description": "Make code clearer and more efficient.",
|
|
5411
|
-
"category": "
|
|
6846
|
+
"category": "Security",
|
|
5412
6847
|
"severity": "major",
|
|
5413
6848
|
"languages": [
|
|
5414
6849
|
"swift"
|
|
@@ -5431,7 +6866,7 @@
|
|
|
5431
6866
|
"SW010": {
|
|
5432
6867
|
"name": "Prefer `isEmpty` over comparing to `\"\"`",
|
|
5433
6868
|
"description": "Increase clarity and avoid potential errors with empty strings.",
|
|
5434
|
-
"category": "
|
|
6869
|
+
"category": "Security",
|
|
5435
6870
|
"severity": "major",
|
|
5436
6871
|
"languages": [
|
|
5437
6872
|
"swift"
|
|
@@ -5454,7 +6889,7 @@
|
|
|
5454
6889
|
"SW011": {
|
|
5455
6890
|
"name": "Do not use `.init()` unnecessarily",
|
|
5456
6891
|
"description": "Increase code clarity.",
|
|
5457
|
-
"category": "
|
|
6892
|
+
"category": "Security",
|
|
5458
6893
|
"severity": "major",
|
|
5459
6894
|
"languages": [
|
|
5460
6895
|
"swift"
|
|
@@ -5477,7 +6912,7 @@
|
|
|
5477
6912
|
"SW012": {
|
|
5478
6913
|
"name": "Always provide a clear message when using `fatalError`",
|
|
5479
6914
|
"description": "Make it easier to trace application crashes.",
|
|
5480
|
-
"category": "
|
|
6915
|
+
"category": "Security",
|
|
5481
6916
|
"severity": "major",
|
|
5482
6917
|
"languages": [
|
|
5483
6918
|
"swift"
|
|
@@ -5500,7 +6935,7 @@
|
|
|
5500
6935
|
"SW013": {
|
|
5501
6936
|
"name": "Prefer `for-where` over `if` inside loops",
|
|
5502
6937
|
"description": "Make code clearer and express intent.",
|
|
5503
|
-
"category": "
|
|
6938
|
+
"category": "Security",
|
|
5504
6939
|
"severity": "major",
|
|
5505
6940
|
"languages": [
|
|
5506
6941
|
"swift"
|
|
@@ -5523,7 +6958,7 @@
|
|
|
5523
6958
|
"SW014": {
|
|
5524
6959
|
"name": "Avoid `as!` (force cast)",
|
|
5525
6960
|
"description": "Prevent crashes due to incorrect type casting.",
|
|
5526
|
-
"category": "
|
|
6961
|
+
"category": "Security",
|
|
5527
6962
|
"severity": "critical",
|
|
5528
6963
|
"languages": [
|
|
5529
6964
|
"swift"
|
|
@@ -5547,7 +6982,7 @@
|
|
|
5547
6982
|
"SW015": {
|
|
5548
6983
|
"name": "Avoid `try!` (force try)",
|
|
5549
6984
|
"description": "Prevent crashes when errors occur.",
|
|
5550
|
-
"category": "
|
|
6985
|
+
"category": "Security",
|
|
5551
6986
|
"severity": "critical",
|
|
5552
6987
|
"languages": [
|
|
5553
6988
|
"swift"
|
|
@@ -5571,7 +7006,7 @@
|
|
|
5571
7006
|
"SW016": {
|
|
5572
7007
|
"name": "Avoid using `!` (force unwrap)",
|
|
5573
7008
|
"description": "Prevent crashes caused by `nil` values.",
|
|
5574
|
-
"category": "
|
|
7009
|
+
"category": "Security",
|
|
5575
7010
|
"severity": "critical",
|
|
5576
7011
|
"languages": [
|
|
5577
7012
|
"swift"
|
|
@@ -5594,7 +7029,7 @@
|
|
|
5594
7029
|
"SW017": {
|
|
5595
7030
|
"name": "Limit function parameters to less than 6",
|
|
5596
7031
|
"description": "Improve readability and reduce complexity.",
|
|
5597
|
-
"category": "
|
|
7032
|
+
"category": "Security",
|
|
5598
7033
|
"severity": "major",
|
|
5599
7034
|
"languages": [
|
|
5600
7035
|
"swift"
|
|
@@ -5617,7 +7052,7 @@
|
|
|
5617
7052
|
"SW018": {
|
|
5618
7053
|
"name": "Do not use tuples with too many elements",
|
|
5619
7054
|
"description": "Reduce complexity, improve readability and maintainability.",
|
|
5620
|
-
"category": "
|
|
7055
|
+
"category": "Security",
|
|
5621
7056
|
"severity": "major",
|
|
5622
7057
|
"languages": [
|
|
5623
7058
|
"swift"
|
|
@@ -5640,7 +7075,7 @@
|
|
|
5640
7075
|
"SW019": {
|
|
5641
7076
|
"name": "Use Swift initializers instead of Objective-C style",
|
|
5642
7077
|
"description": "Keep Swift code pure, clear, and maintainable.",
|
|
5643
|
-
"category": "
|
|
7078
|
+
"category": "Security",
|
|
5644
7079
|
"severity": "major",
|
|
5645
7080
|
"languages": [
|
|
5646
7081
|
"swift"
|
|
@@ -5663,7 +7098,7 @@
|
|
|
5663
7098
|
"SW020": {
|
|
5664
7099
|
"name": "Data types should be nested at most 1 level",
|
|
5665
7100
|
"description": "Avoid unreadable and hard-to-debug code due to deep nesting.",
|
|
5666
|
-
"category": "
|
|
7101
|
+
"category": "Security",
|
|
5667
7102
|
"severity": "major",
|
|
5668
7103
|
"languages": [
|
|
5669
7104
|
"swift"
|
|
@@ -5686,7 +7121,7 @@
|
|
|
5686
7121
|
"SW021": {
|
|
5687
7122
|
"name": "Do not use access modifiers with extensions",
|
|
5688
7123
|
"description": "Keep extensions clear and consistent.",
|
|
5689
|
-
"category": "
|
|
7124
|
+
"category": "Security",
|
|
5690
7125
|
"severity": "critical",
|
|
5691
7126
|
"languages": [
|
|
5692
7127
|
"swift"
|
|
@@ -5710,7 +7145,7 @@
|
|
|
5710
7145
|
"SW022": {
|
|
5711
7146
|
"name": "Call `super` in lifecycle methods",
|
|
5712
7147
|
"description": "Ensure default behaviors are executed correctly.",
|
|
5713
|
-
"category": "
|
|
7148
|
+
"category": "Security",
|
|
5714
7149
|
"severity": "major",
|
|
5715
7150
|
"languages": [
|
|
5716
7151
|
"swift"
|
|
@@ -5733,7 +7168,7 @@
|
|
|
5733
7168
|
"SW023": {
|
|
5734
7169
|
"name": "Do not use `override` in extensions",
|
|
5735
7170
|
"description": "Avoid changing original behavior and keep extensions for extension only.",
|
|
5736
|
-
"category": "
|
|
7171
|
+
"category": "Security",
|
|
5737
7172
|
"severity": "critical",
|
|
5738
7173
|
"languages": [
|
|
5739
7174
|
"swift"
|
|
@@ -5756,7 +7191,7 @@
|
|
|
5756
7191
|
"SW024": {
|
|
5757
7192
|
"name": "Prefer `private` over `fileprivate`",
|
|
5758
7193
|
"description": "Restrict access scope more tightly.",
|
|
5759
|
-
"category": "
|
|
7194
|
+
"category": "Security",
|
|
5760
7195
|
"severity": "major",
|
|
5761
7196
|
"languages": [
|
|
5762
7197
|
"swift"
|
|
@@ -5779,7 +7214,7 @@
|
|
|
5779
7214
|
"SW025": {
|
|
5780
7215
|
"name": "Do not declare Unit Test functions as `private`",
|
|
5781
7216
|
"description": "Ensure tests are executed from the test target.",
|
|
5782
|
-
"category": "
|
|
7217
|
+
"category": "Security",
|
|
5783
7218
|
"severity": "critical",
|
|
5784
7219
|
"languages": [
|
|
5785
7220
|
"swift"
|
|
@@ -5802,7 +7237,7 @@
|
|
|
5802
7237
|
"SW026": {
|
|
5803
7238
|
"name": "Do not call `super` in specific methods",
|
|
5804
7239
|
"description": "Avoid errors from unnecessary `super` calls.",
|
|
5805
|
-
"category": "
|
|
7240
|
+
"category": "Security",
|
|
5806
7241
|
"severity": "major",
|
|
5807
7242
|
"languages": [
|
|
5808
7243
|
"swift"
|
|
@@ -5825,7 +7260,7 @@
|
|
|
5825
7260
|
"SW027": {
|
|
5826
7261
|
"name": "Prefer `.min()` or `.max()` over `sorted().first/last`",
|
|
5827
7262
|
"description": "Improve performance and clarity.",
|
|
5828
|
-
"category": "
|
|
7263
|
+
"category": "Security",
|
|
5829
7264
|
"severity": "critical",
|
|
5830
7265
|
"languages": [
|
|
5831
7266
|
"swift"
|
|
@@ -5848,7 +7283,7 @@
|
|
|
5848
7283
|
"SW028": {
|
|
5849
7284
|
"name": "Prefer shorthand syntax `[T]` over `Array<T>`",
|
|
5850
7285
|
"description": "Make code more idiomatic and concise.",
|
|
5851
|
-
"category": "
|
|
7286
|
+
"category": "Security",
|
|
5852
7287
|
"severity": "critical",
|
|
5853
7288
|
"languages": [
|
|
5854
7289
|
"swift"
|
|
@@ -5871,7 +7306,7 @@
|
|
|
5871
7306
|
"SW029": {
|
|
5872
7307
|
"name": "Warn for unused closure parameters",
|
|
5873
7308
|
"description": "Avoid compile warnings and improve readability.",
|
|
5874
|
-
"category": "
|
|
7309
|
+
"category": "Security",
|
|
5875
7310
|
"severity": "major",
|
|
5876
7311
|
"languages": [
|
|
5877
7312
|
"swift"
|
|
@@ -5894,7 +7329,7 @@
|
|
|
5894
7329
|
"SW030": {
|
|
5895
7330
|
"name": "Avoid using `enumerated()` when index is not needed",
|
|
5896
7331
|
"description": "Remove redundant code and avoid performance risks.",
|
|
5897
|
-
"category": "
|
|
7332
|
+
"category": "Security",
|
|
5898
7333
|
"severity": "major",
|
|
5899
7334
|
"languages": [
|
|
5900
7335
|
"swift"
|
|
@@ -5917,7 +7352,7 @@
|
|
|
5917
7352
|
"SW031": {
|
|
5918
7353
|
"name": "Do not use optional binding just to call a function or property",
|
|
5919
7354
|
"description": "Increase clarity and avoid deep nesting.",
|
|
5920
|
-
"category": "
|
|
7355
|
+
"category": "Security",
|
|
5921
7356
|
"severity": "critical",
|
|
5922
7357
|
"languages": [
|
|
5923
7358
|
"swift"
|
|
@@ -5940,7 +7375,7 @@
|
|
|
5940
7375
|
"SW032": {
|
|
5941
7376
|
"name": "Do not use `@IBInspectable` with unsupported types and constants",
|
|
5942
7377
|
"description": "Prevent crashes or compile-time errors.",
|
|
5943
|
-
"category": "
|
|
7378
|
+
"category": "Security",
|
|
5944
7379
|
"severity": "major",
|
|
5945
7380
|
"languages": [
|
|
5946
7381
|
"swift"
|
|
@@ -5963,7 +7398,7 @@
|
|
|
5963
7398
|
"SW033": {
|
|
5964
7399
|
"name": "Parameters must be vertically aligned when calling functions",
|
|
5965
7400
|
"description": "Improve readability and maintain consistent code style.",
|
|
5966
|
-
"category": "
|
|
7401
|
+
"category": "Security",
|
|
5967
7402
|
"severity": "major",
|
|
5968
7403
|
"languages": [
|
|
5969
7404
|
"swift"
|
|
@@ -5987,7 +7422,7 @@
|
|
|
5987
7422
|
"SW034": {
|
|
5988
7423
|
"name": "Use `-> Void` instead of `-> ()` for function types",
|
|
5989
7424
|
"description": "Increase consistency and readability.",
|
|
5990
|
-
"category": "
|
|
7425
|
+
"category": "Security",
|
|
5991
7426
|
"severity": "major",
|
|
5992
7427
|
"languages": [
|
|
5993
7428
|
"swift"
|
|
@@ -6010,7 +7445,7 @@
|
|
|
6010
7445
|
"SW035": {
|
|
6011
7446
|
"name": "Delegates must be marked as `weak`",
|
|
6012
7447
|
"description": "Prevent retain cycles and memory leaks.",
|
|
6013
|
-
"category": "
|
|
7448
|
+
"category": "Security",
|
|
6014
7449
|
"severity": "major",
|
|
6015
7450
|
"languages": [
|
|
6016
7451
|
"swift"
|
|
@@ -6034,7 +7469,7 @@
|
|
|
6034
7469
|
"T002": {
|
|
6035
7470
|
"name": "Interface names should start with 'I'",
|
|
6036
7471
|
"description": "Ensure interface names follow naming conventions with 'I' prefix.",
|
|
6037
|
-
"category": "
|
|
7472
|
+
"category": "Frontend",
|
|
6038
7473
|
"severity": "major",
|
|
6039
7474
|
"languages": [
|
|
6040
7475
|
"javascript"
|
|
@@ -6057,7 +7492,7 @@
|
|
|
6057
7492
|
"T003": {
|
|
6058
7493
|
"name": "Avoid using @ts-ignore without a clear justification",
|
|
6059
7494
|
"description": "Avoid using @ts-ignore without a clear reason.",
|
|
6060
|
-
"category": "
|
|
7495
|
+
"category": "Frontend",
|
|
6061
7496
|
"severity": "major",
|
|
6062
7497
|
"languages": [
|
|
6063
7498
|
"javascript"
|
|
@@ -6080,7 +7515,7 @@
|
|
|
6080
7515
|
"T004": {
|
|
6081
7516
|
"name": "Disallow declaring empty types like `type X = {}`",
|
|
6082
7517
|
"description": "Avoid declaring meaningless empty data types.",
|
|
6083
|
-
"category": "
|
|
7518
|
+
"category": "Frontend",
|
|
6084
7519
|
"severity": "major",
|
|
6085
7520
|
"languages": [
|
|
6086
7521
|
"javascript"
|
|
@@ -6103,7 +7538,7 @@
|
|
|
6103
7538
|
"T007": {
|
|
6104
7539
|
"name": "Avoid declaring functions inside constructors or class bodies",
|
|
6105
7540
|
"description": "Avoid declaring functions inside constructors or class bodies.",
|
|
6106
|
-
"category": "
|
|
7541
|
+
"category": "Frontend",
|
|
6107
7542
|
"severity": "major",
|
|
6108
7543
|
"languages": [
|
|
6109
7544
|
"javascript"
|
|
@@ -6126,7 +7561,7 @@
|
|
|
6126
7561
|
"T010": {
|
|
6127
7562
|
"name": "Avoid deeply nested union or tuple types",
|
|
6128
7563
|
"description": "Avoid complex nested union or tuple types.",
|
|
6129
|
-
"category": "
|
|
7564
|
+
"category": "Frontend",
|
|
6130
7565
|
"severity": "major",
|
|
6131
7566
|
"languages": [
|
|
6132
7567
|
"javascript"
|
|
@@ -6149,7 +7584,7 @@
|
|
|
6149
7584
|
"T015": {
|
|
6150
7585
|
"name": "Do not use `instanceof` to distinguish behavior when interfaces are available",
|
|
6151
7586
|
"description": "Use polymorphism instead of branching with type checks.",
|
|
6152
|
-
"category": "
|
|
7587
|
+
"category": "Frontend",
|
|
6153
7588
|
"severity": "major",
|
|
6154
7589
|
"languages": [
|
|
6155
7590
|
"javascript"
|
|
@@ -6172,7 +7607,7 @@
|
|
|
6172
7607
|
"T016": {
|
|
6173
7608
|
"name": "Use strict type checking",
|
|
6174
7609
|
"description": "Leverage TypeScript's type safety to reduce runtime errors.",
|
|
6175
|
-
"category": "
|
|
7610
|
+
"category": "Frontend",
|
|
6176
7611
|
"severity": "critical",
|
|
6177
7612
|
"languages": [
|
|
6178
7613
|
"javascript"
|
|
@@ -6196,7 +7631,7 @@
|
|
|
6196
7631
|
"T017": {
|
|
6197
7632
|
"name": "Use async/await instead of Promises",
|
|
6198
7633
|
"description": "Improve code readability and ease debugging of async operations.",
|
|
6199
|
-
"category": "
|
|
7634
|
+
"category": "Frontend",
|
|
6200
7635
|
"severity": "major",
|
|
6201
7636
|
"languages": [
|
|
6202
7637
|
"javascript"
|
|
@@ -6220,7 +7655,7 @@
|
|
|
6220
7655
|
"T018": {
|
|
6221
7656
|
"name": "Use proper error handling",
|
|
6222
7657
|
"description": "Ensure robust error handling and good user experience.",
|
|
6223
|
-
"category": "
|
|
7658
|
+
"category": "Frontend",
|
|
6224
7659
|
"severity": "major",
|
|
6225
7660
|
"languages": [
|
|
6226
7661
|
"javascript"
|
|
@@ -6244,7 +7679,7 @@
|
|
|
6244
7679
|
"T019": {
|
|
6245
7680
|
"name": "Do not assign to this arbitrarily",
|
|
6246
7681
|
"description": "Maintain proper context and avoid this manipulation.",
|
|
6247
|
-
"category": "
|
|
7682
|
+
"category": "Frontend",
|
|
6248
7683
|
"severity": "major",
|
|
6249
7684
|
"languages": [
|
|
6250
7685
|
"javascript"
|
|
@@ -6267,7 +7702,7 @@
|
|
|
6267
7702
|
"T020": {
|
|
6268
7703
|
"name": "Avoid export default for multi-responsibility modules",
|
|
6269
7704
|
"description": "Improve tree-shaking and module clarity.",
|
|
6270
|
-
"category": "
|
|
7705
|
+
"category": "Frontend",
|
|
6271
7706
|
"severity": "major",
|
|
6272
7707
|
"languages": [
|
|
6273
7708
|
"javascript"
|
|
@@ -6290,7 +7725,7 @@
|
|
|
6290
7725
|
"T021": {
|
|
6291
7726
|
"name": "Limit deeply nested generics",
|
|
6292
7727
|
"description": "Improve code readability and TypeScript performance.",
|
|
6293
|
-
"category": "
|
|
7728
|
+
"category": "Frontend",
|
|
6294
7729
|
"severity": "major",
|
|
6295
7730
|
"languages": [
|
|
6296
7731
|
"javascript"
|