Ikhodi Ishintsha Imigqa

Umbuzo: Iyini isamba senani lemigqa ethintiwe (imigqa yengezwe kanye nemigqa ikhishiwe) kuzo zonke izinguquko kukhodi yomthombo phakathi nenkathi ethile?

Incazelo

Lapho bethula izinguquko kukhodi yomthombo, onjiniyela bathinta (hlela, engeza, susa) imigqa yamafayela ekhodi yomthombo. Le metric icabangela inombolo ehlanganisiwe yemigqa ethintwa izinguquko kukhodi yomthombo ezenziwe phakathi nenkathi ethile. Lokhu kusho ukuthi uma umugqa othile efayeleni elithile uthintwa ezinguqukweni ezintathu ezihlukene, uzobalwa njengemigqa emithathu. Njengoba kumasistimu amaningi okuphatha amakhodi omthombo kunzima noma kungenzeki ukusho ngokunembile ukuthi imigqa isusiwe yabe yengezwa, noma isanda kuhlelwa, sizocabangela ukuhlela umugqa njengokuwususa bese kamuva siwungeza ngokuqukethwe okusha. Ngayinye yalezo (ukukhipha nokwengeza) izobhekwa "njengokuthinta". Ngakho-ke, uma umugqa othile efayeleni elithile uhlelwa izikhathi ezintathu, uzobalwa njengezinguquko eziyisithupha ezihlukene (ukususwa okuthathu, kanye nokwengezwa okuthathu).

Kulolu daba, sicubungula izinguquko kukhodi yomthombo njengoba kuchazwe kuyo Izibophezelo Zokushintsha Ikhodi. Imigqa yekhodi izoba yinoma yimuphi umugqa wefayela lekhodi yomthombo, okuhlanganisa amazwana nemigqa engenalutho.

Izinhloso

  • Ivolumu yomsebenzi wokubhala amakhodi:
    Nakuba izinguquko zekhodi zingaba ummeleli wokwenza amakhodi wephrojekthi, akuzona zonke izinguquko ezifanayo. Uma kucatshangelwa inombolo ehlanganisiwe yemigqa ethintwa kuzo zonke izinguquko kunikeza umbono ohambisanayo wokuthi zinkulu kangakanani izinguquko, futhi ngokuvamile, bukhulu kangakanani umthamo womsebenzi wokubhala amakhodi.

Implementation

Ukusetshenziswa nokusatshalaliswa kwamamethrikhi ezempilo kungase kuholele ekwephuleni ubumfihlo. Izinhlangano zingase zichayeke ezingozini. Lezi zingozi zingase zigeleze kusukela ekuthobeleni i-GDPR e-EU, nomthetho wezwe wase-US, noma nomunye umthetho. Kungase futhi kube nezingozi zenkontileka ezivela kumigomo yesevisi kubahlinzeki bedatha njenge-GitHub ne-GitLab. Ukusetshenziswa kwamamethrikhi kufanele kuhlolwe ubungozi kanye nezinkinga zedatha yezimiso zedatha ezingaba khona. Ngicela ubone Idokhumenti ye-CHAOSS Data Ethics ukuze uthole isiqondiso esengeziwe.

Izihlanganisi:

  • Bala. Isamba senani lemigqa eshintshile (ethintwayo) phakathi nenkathi.

Amapharamitha:

  • Isikhathi: Idethi yokuqala neyokuphela kwesikhathi. Okuzenzakalelayo: ingunaphakade.
    Isikhathi lapho izinguquko zicatshangelwa.
  • Imibandela yekhodi yomthombo; Okuzenzakalelayo kwe-algorithm: wonke amafayela ayikhodi yomthombo.
    Uma sigxile kukhodi yomthombo, sidinga umbandela wokunquma ukuthi ifayela liyingxenye yekhodi yomthombo noma cha.
  • Uhlobo lokushintsha ikhodi yomthombo:
    • Imigqa yengeziwe
    • Imigqa isusiwe
    • I-Whitespace

Izihlungi

  • Ngabalingisi (umbhali, umkomishi). Idinga ukuhlanganisa umlingisi (ukuhlanganisa ama-id ahambisana nombhali ofanayo).

  • Ngamaqembu abadlali (umqashi, ubulili...). Idinga ukuqoqwa kwabadlali, futhi okungenzeka, ukuhlanganisa umlingisi.

  • By tags (isetshenziswa emyalezweni wokuzibophezela). Idinga isakhiwo somlayezo wokuzibophezela. Le thegi ingasetshenziswa kuphrojekthi yomthombo ovulekile ukuxhumana nabo bonke abanikeli uma ukuzibophezela, isibonelo, kuwukulungisa iphutha noma ukuthuthukisa isici.

Okubonwayo

  • Bala ngenyanga ngokuhamba kwesikhathi
  • Bala iqembu ngalinye ngokuhamba kwesikhathi

Lawa angamelwa njengamashadi ebha, nesikhathi esisebenza ku-eksisi X. Ibha ngayinye izomela izinguquko zekhodi phakathi nenkathi ethile (isb, inyanga).

Amathuluzi Ahlinzeka Ngemethrikhi

  • I-GrimoireLab inikeza le metric ngaphandle kwebhokisi.

    • Buka isibonelo ku- I-CHAOSS isibonelo se-Bitergia Analytics.
    • Landa futhi ungenise ideshibhodi elungele ukuhamba equkethe izibonelo zalokhu kuboniswa kwemethrikhi evela ku- Iqoqo lephaneli ye-GrimoireLab Sigils.
    • Engeza isampula yokubuka kunoma iyiphi ideshibhodi ye-GrimoreLab Kibiter ngokulandela le miyalo:
    • Dala okusha Area ishadi
    • Khetha git Inkomba
    • I-Y-eksisi 1: Sum Ukuhlanganisa, lines_added Inkambu, Lines Added Ilebula ngokwezifiso
    • I-Y-eksisi 2: Sum Ukuhlanganisa, painless_inverted_lines_removed_git Inkambu, Lines Removed Ilebula ngokwezifiso
    • I-X-eksisi: Date Histogram Ukuhlanganisa, grimoire_creation_date Inkambu, Auto Isikhawu, Time Ilebula ngokwezifiso
    • Isibonelo sesithombe-skrini:

    Isithombe-skrini se-GrimoireLab se-metric Code_Changes_Lines

Amasu Okuqoqwa Kwedatha

Incazelo eqondile: Git

Ezimweni ze-git, sichaza "ushintsho lwekhodi" kanye "nosuku loshintsho" njengoba sichaza Izibophezelo Zokushintsha Ikhodi. Idethi yoshintsho ingachazwa (ngokuyicubungula esikhathini esithile noma cha) njengosuku lombhali noma idethi yombhali wesibopho se-git esihambisanayo.

Njengoba i-git inikeza izinguquko njengama-patches e-diff (uhlu lwemigqa yengezwe futhi yasuswa), ngamunye waleyo migqa eshiwo njengomugqa ongeziwe noma umugqa osusiwe ku-diff uzobhekwa njengomugqa oshintshiwe (othintiwe). Uma umugqa ususiwe futhi wengezwa, uzobhekwa "njengezinguquko ezimbili emugqeni".

Amapharamitha ayisibopho:

  • Uhlobo lwedethi. Idethi yombhali noma idethi yombhali. Okuzenzakalelayo: idethi yombhali.
    Ekuzinikeleni kwe-git ngakunye, kugcinwa izinsuku ezimbili: lapho isivumelwano sigunyazwa, nalapho senziwe endaweni yokugcina. Ukunquma isikhathi, eyodwa yazo kufanele ikhethwe.

  • Faka phakathi ukuzibophezela. I-Boolean. Okuzenzakalelayo: Iqiniso.
    Ukuhlanganisa ukwenza lokho okuhlanganisa igatsha, futhi kwezinye izimo akubhekwa njengokubonisa umsebenzi wokubhala amakhodi

Okubhekwayo