Proposal improve variable naming
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- c
- Ambito
- api, backend-api-design
Direzione di ricerca
Inizia esaminando la struttura cJSON e i nomi proposti nell’issue. Determina l’API pubblica completa e l’ambito di compatibilità per deprecare i campi esistenti e introdurre dei sostituti. L’attività è completa quando esiste un piano concordato per la denominazione e la migrazione, prima di poter definire l’ambito dell’implementazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I used to be a big fan of short variable names, especially in the "short naming family," until I switched my IDE from legacy Turbo C/DOS to modern VSCode on Windows 7. Short, mixed-style naming is friendly to some auto-complete CLI tool or util, but it's terrible for spell checkers.
Proposal: Improve Variable Naming
Keep the original names but mark them as DEPRECATED in version 2.x.x. Introduce new, clearer names and promote them as the standard going forward. Here’s a pseudocode example:
/* The cJSON structure: */
typedef struct cJSON
{
/* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
struct cJSON *next;
struct cJSON *prev;
/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
struct cJSON *child;
/* The type of the item, as above. */
int type;
/* The item's string, if type == cJSON_String or type == cJSON_Raw */
/* Deprecated: use value_string instead. */
char *valuestring;
/* The value of value_string is the same as valuestring. */
char *value_string;
/* Writing to valueint is DEPRECATED. Use cJSON_SetNumberValue instead. */
int valueint;
/* The item's number, if type == cJSON_Number */
/* Deprecated: use value_double instead. */
double valuedouble;
double *value_double;
/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
char *string;
} cJSON;
- Lingua principale
- C
- Stelle
- 13k
- Fork
- 3.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DaveGamble/cJSON
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
DaveGamble/cJSON#1094 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DaveGamble/cJSON#1093 ·
-
Use-after-free in cJSONUtils_ApplyPatches when a patch removes the patch arrayForse già presa @iliasabk l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
DaveGamble/cJSON#1082 ·
-
Use-after-free in cJSON_ReplaceItemInObject when the key is the item's own nameForse già presa @iliasabk l’ha presa 22 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
DaveGamble/cJSON#1081 ·
-
buffer_skip_whitespace accepts every byte below 0x21 as whitespaceForse già presa @AetherAI3 l’ha presa 33 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DaveGamble/cJSON#1074 ·
Tutte le issue di DaveGamble/cJSON
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
luainkernel/lunatik#1853 ·
I maintainer di solito rispondono entro 1 giorno
-
encoding.binary: bounds check guard is compiled away, so decode functions read past the sliceAperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
resetes12/pokeemerald#204 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 6 giorni