Cov txheej txheem:

Sonar static code tsom xam yog dab tsi?
Sonar static code tsom xam yog dab tsi?

Video: Sonar static code tsom xam yog dab tsi?

Video: Sonar static code tsom xam yog dab tsi?
Video: University of Pittsburgh Patient & Family Program on POTS 2024, Kaum ib hlis
Anonim

SonarQube (yav tas los Sonar ) yog open- qhov chaw platform tsim los ntawm SonarSource rau kev soj ntsuam tas li ntawm code zoo ua tsis siv neeg tshuaj xyuas nrog static tsom xam ntawm code txhawm rau txheeb xyuas cov kab mob, code hnov tsw, thiab muaj kev ruaj ntseg vulnerabilities ntawm 20+ programming lus.

Ib yam li ntawd, nws tau nug, Sonar Code yog dab tsi?

Sonar yog lub vev xaib code Cov cuab yeej tsom xam zoo rau Maven raws li Java tej yaam num. Nws npog thaj tsam dav ntawm code Cov ntsiab lus kuaj xyuas zoo uas suav nrog: Architecture & Design, Complexity, Duplications, Coding Rules, Potential Bugs, Unit Test thiab lwm yam.

SonarQube yog dab tsi thiab nws ua haujlwm li cas? SonarQube yog lub platform qhib rau kev tshuaj xyuas tas li ntawm cov cai zoo. Siv kev txheeb xyuas cov lej zoo li qub, nws sim kuaj cov kab, cov ntxhiab tsw ntxhiab thiab kev nyab xeeb tsis zoo. Ntau lub plugins muaj los siv nws ua ib feem ntawm kev sib txuas txuas txuas ntxiv, suav nrog rau Maven, Jenkins thiab GitHub.

Ua kom pom qhov no, koj ua li cas qhov kev txheeb xyuas cov lej zoo li qub?

Ntawm no yog li cas static code tsom xam ua haujlwm

  1. Sau tus Cai. Koj thawj kauj ruam yog sau tus lej.
  2. Khiav ib tug Static Code Analyzer. Tom ntej no, khiav ib tug zoo li qub code analyzer tshaj koj code.
  3. Saib xyuas cov txiaj ntsig. Tus kws tshuaj ntsuam xyuas tus lej zoo li qub yuav txheeb xyuas cov lej uas tsis ua raws li cov cai coding.
  4. Kho Yam Yuav Tsum Tau Kho.
  5. Nkag mus rau Kev Xeem.

Yuav ua li cas koj Analyze code siv SonarQube?

Kev tshuaj xyuas nrog rau SonarQube Scanner Scroll cia rau hauv SonarQube Scanner configuration seem thiab nyem rau ntawm "Ntxiv SonarQube Scanner." Nkag mus rau cov ntsiab lus. Configure project thiab scroll down mus rau Build section. Ntxiv rau SonarQube -Scanner tsim cov kauj ruam rau koj tsim. Configure lub Kev tshuaj xyuas SonarQube khoom.

Pom zoo: