insightsengineering / insightsengineering/teal.code
[Feature Request]: High cyclomatic complexity leds to bad readability
- Lingua principale
- R
- Stelle
- 12
- Fork
- 11
- Merge medio
- 1g 17h
- PR unite (30g)
- 1
Descrizione
### Feature description
There are some functions that are highly complex and hard to read:
```
name cyclocomp
13 extract_occurrence 30
12 extract_dependency 13
33 move_functions_after_arrow 10
30 lang2calls 7
5 c.qenv 6
17 fix_shifted_comments 6
```
It would be good to make it easier to read the `extract_dependency` and `extract_occurrence` so that it is easier to modify them and fix any error.
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [x] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [x] I agree to follow this project's Security Policy.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Individua le implementazioni R e i chiamanti di extract_dependency e extract_occurrence, quindi leggi i test esistenti che li riguardano. Esegui il refactoring delle funzioni per migliorarne la leggibilità e ridurre la complessità ciclomatica, preservando il comportamento attuale; verifica che i controlli esistenti del repository vadano a buon fine.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- tooling
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 45/100