Add docstring reporting script and workflows (#1333)

* Trim docstring coverage snapshots

* format all the tings

* update lock

* Update docstring coverage snapshots (#1521)

* docstring fixes

* address agent feedback

* update lock files

* address agent feedback

* lock react-native-svg version to prevent pipeline failures

* update docstring logic

* remove docstring coverage from ci

* remove old report, fix cursorignroe rule
This commit is contained in:
Justin Hernandez
2025-12-25 11:17:42 -08:00
committed by GitHub
parent 8c96f6fd5c
commit 7dbd46f245
17 changed files with 2076 additions and 765 deletions

View File

@@ -22,8 +22,8 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1194.0)
aws-sdk-core (3.239.2)
aws-partitions (1.1198.0)
aws-sdk-core (3.240.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
@@ -34,7 +34,7 @@ GEM
aws-sdk-kms (1.118.0)
aws-sdk-core (~> 3, >= 3.239.1)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.206.0)
aws-sdk-s3 (1.209.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
@@ -43,7 +43,7 @@ GEM
babosa (1.0.4)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
bigdecimal (4.0.1)
claide (1.1.0)
cocoapods (1.16.2)
addressable (~> 2.8)
@@ -118,7 +118,7 @@ GEM
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.1)
faraday-multipart (1.2.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
@@ -219,7 +219,7 @@ GEM
domain_name (~> 0.5)
httpclient (2.9.0)
mutex_m
i18n (1.14.7)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.18.0)
@@ -229,7 +229,8 @@ GEM
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (5.27.0)
minitest (6.0.0)
prism (~> 1.5)
molinillo (0.8.0)
multi_json (1.18.0)
multipart-post (2.4.1)
@@ -244,6 +245,7 @@ GEM
optparse (0.8.1)
os (1.1.4)
plist (3.7.2)
prism (1.7.0)
public_suffix (4.0.7)
racc (1.8.1)
rake (13.3.1)

View File

@@ -0,0 +1,14 @@
# Mobile app docstring style guide
Docstrings for the React Native app live alongside the source in `app/src`. We follow [TSDoc](https://tsdoc.org) conventions so that typed tooling can generate consistent API documentation.
## Authoring guidelines
- Document every exported component, hook, utility, or type alias with a leading `/** ... */` block written in the imperative mood.
- Include `@param`, `@returns`, and `@remarks` tags when they improve clarity, especially for side-effects or platform-specific behaviour.
- Keep examples concise. Prefer inline code blocks for short snippets and use fenced blocks only when you need multiple lines.
- Mention platform differences explicitly (for example, “iOS only”) so consumers understand the scope of the implementation.
## Coverage expectations
Docstring coverage can be checked locally by running `yarn docstrings:app` (or `yarn docstrings` for both app and SDK). The reports generate JSON snapshots in `docs/coverage/*.json` that can be committed to track progress over time. Coverage targets are not enforced—treat the reports as guardrails to identify documentation gaps.

View File

@@ -2131,7 +2131,7 @@ PODS:
- ReactCommon/turbomodule/core
- Sentry/HybridSDK (= 8.53.2)
- Yoga
- RNSVG (15.15.0):
- RNSVG (15.14.0):
- DoubleConversion
- glog
- hermes-engine
@@ -2151,9 +2151,9 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.15.0)
- RNSVG/common (= 15.14.0)
- Yoga
- RNSVG/common (15.15.0):
- RNSVG/common (15.14.0):
- DoubleConversion
- glog
- hermes-engine
@@ -2635,7 +2635,7 @@ SPEC CHECKSUMS:
RNReactNativeHapticFeedback: e526ac4a7ca9fb23c7843ea4fd7d823166054c73
RNScreens: 806e1449a8ec63c2a4e4cf8a63cc80203ccda9b8
RNSentry: 6ad982be2c8e32dab912afb4132b6a0d88484ea0
RNSVG: 39476f26bbbe72ffe6194c6fc8f6acd588087957
RNSVG: e1cf5a9a5aa12c69f2ec47031defbd87ae7fb697
segment-analytics-react-native: a0c29c75ede1989118b50cac96b9495ea5c91a1d
Sentry: 59993bffde4a1ac297ba6d268dc4bbce068d7c1b
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748

View File

@@ -34,9 +34,8 @@ const config = {
],
transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
babelTransformerPath:
require.resolve('react-native-svg-transformer/react-native'),
disableImportExportTransform: true,
inlineRequires: true,
},

View File

@@ -162,8 +162,8 @@
"react-native-safe-area-context": "^5.6.1",
"react-native-screens": "4.15.3",
"react-native-sqlite-storage": "^6.0.1",
"react-native-svg": "^15.14.0",
"react-native-svg-web": "^1.0.9",
"react-native-svg": "15.14.0",
"react-native-svg-web": "1.0.9",
"react-native-url-polyfill": "^3.0.0",
"react-native-web": "^0.19.0",
"react-native-webview": "^13.16.0",

View File

@@ -35,8 +35,10 @@ const ModalBackDrop = styled(View, {
height: '100%',
});
export interface ModalNavigationParams
extends Omit<ModalParams, 'onButtonPress' | 'onModalDismiss'> {
export interface ModalNavigationParams extends Omit<
ModalParams,
'onButtonPress' | 'onModalDismiss'
> {
callbackId: number;
}

View File

@@ -132,9 +132,8 @@ export const getWhiteListedDisclosureAddresses = async (): Promise<
export const hasUserAnIdentityDocumentRegistered =
async (): Promise<boolean> => {
try {
const { loadDocumentCatalogDirectlyFromKeychain } = await import(
'@/providers/passportDataProvider'
);
const { loadDocumentCatalogDirectlyFromKeychain } =
await import('@/providers/passportDataProvider');
const catalog = await loadDocumentCatalogDirectlyFromKeychain();
return catalog.documents.some(doc => doc.isRegistered === true);

View File

@@ -129,12 +129,10 @@ export const usePointEventStore = create<PointEventState>()((set, get) => ({
loadDisclosureEvents: async () => {
try {
const { getDisclosurePointEvents } = await import(
'@/services/points/getEvents'
);
const { useProofHistoryStore } = await import(
'@/stores/proofHistoryStore'
);
const { getDisclosurePointEvents } =
await import('@/services/points/getEvents');
const { useProofHistoryStore } =
await import('@/stores/proofHistoryStore');
await useProofHistoryStore.getState().initDatabase();
const disclosureEvents = await getDisclosurePointEvents();
const existingEvents = get().events.filter(e => e.type !== 'disclosure');