ãŸããã
C / C ++ / CïŒãJavaãªã©ã®éçã¢ãã©ã€ã¶ãŒã«é¢ããèšäºãå€æ°ãããŸãã MacOS / iOSã§ã®ãã€ãã£ãéçºã®ããã®ããŸããŸãªéçã¢ãã©ã€ã¶ãŒã®äœ¿çšã«é¢ããç 究ã«ã€ããŠã¯ãããŸã泚ç®ãããŠããŸããã
ObjCããã³Swiftã®ããŸããŸãªãããžã§ã¯ãã§äœ¿çšãããéçã³ãŒãã¢ãã©ã€ã¶ãŒã®äœ¿çšã®åæãææ¡ãããŠããŸãã åæã«ãããã¯ã¬ãã¥ãŒã§ã¯ãªããã¡ã¢ãªãªãŒã¯ããè匱æ§ãŸã§ãã³ãŒãå ã®äœããã®ãšã©ãŒãèŠã€ããããã®ããŸããŸãªããŒã«ã®äœ¿çšã«é¢ãã泚æäºé ã§ãã ãã ããããŒã¿ã¯ã客芳æ§ãšçµè«ã®å®å šæ§ãããã³åæ©åšã§åŸãããçµæã®åæã®æ·±ââããè£ ã£ãŠããŸããã
ãšã³ããªãŒ
æ°å¹ŽåããŸã iOSã®åå¿è éçºè ã§ããããiOSã¢ããªã±ãŒã·ã§ã³çšã«ObjCã§èšè¿°ãããã³ãŒãã®å質ãæ€èšŒããåé¡ã«ééããŸããã æ®å¿µãªããããšã©ãŒãèŠã€ããŠããã®ãããªãã®ããªãããã«ãããè³æ Œã®ããååãšã³ãŒãã«ã€ããŠè°è«ããããšã¯åžžã«å¯èœã§ã¯ãããŸããã§ããã æåã®åŠå®çãªã¬ãã¥ãŒã¯å»ºèšçã«èªèãããŠããŸããããããã§ãå¥çŽãç· çµããåã«éçºè ã³ãŒãã®äŸãè©äŸ¡ããã顧客ã倱ããŸããã ãã®çµæã顧客ã«ãããå®èšŒããåã«æ倧ã®ã³ãŒãæ¬ é¥ãèå¥ããããŒã«ã䜿çšããå¿ èŠããããŸããã éçºäžã®è£œåã®æœåšçãªåé¡ãç¹å®ããããã«ãã¹ãŠã®ã³ããããè¡ã£ãåŸã ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã§ã³ãŒãã®å質ã«é¢ããã¬ããŒããäœæããããšãåžžã«éèŠã§ãã£ãããšã«æ³šæããŠãã ããã
ãœãããåæ£ãããžã§ã¯ããŸã§ãããŸããŸãªå€§éžã«ããŒã ãé 眮ããŠãããŸããŸãªããŒã ã§ä»äºãããªããã°ãªããŸããã§ããã ååã®ã¹ãã«ã¬ãã«ã¯ãå ¥éã¬ãã«ãã建ç¯å®¶ã«ãŸã§åã³ãŸããã ããŒã ã®æ§æãåæ§ã«çµ¶ããå€åããŸãããããã¯ãSwiftã®æ°ããããŒãžã§ã³ãæ¯å¹Žç»å ŽããObjectiveC ãæ¢ãŸã£ããšããäºå®ã«ããããããã§ãã
ãããã®ãã¹ãŠã®èŠå ã«ããããšã©ãŒã®æ倧æ°ãç¹å®ããã³ãŒãã®äžè²«æ§ãšèªã¿ããããé«ããããŒã«ã®æ€çŽ¢ãä¿é²ãããŸããã
Clangéçã¢ãã©ã€ã¶ãŒ
ããã¯ãXcodeãŠãŒã¶ãŒãééããæåã®çµã¿èŸŒã¿ã¢ãã©ã€ã¶ãŒã§ãã ã¢ããªã±ãŒã·ã§ã³ãèµ·åãããã³ã«ã³ãŒããåæããã«ã¯ã ããã§èª¬æããèšå®ãè¡ãå¿ èŠããããŸãã ãããã®æšå¥šäºé ã¯ãåã³ãããã®åã«ã³ãŒããæ€èšŒããæåã®ã¹ããããšããŠããã¹ãŠã®ãŠãŒã¶ãŒã䜿çšããå¿ èŠããããŸãã
Swiftã®ãµããŒãããªããããSwiftã®ç¯å²ã¯å€§å¹ ã«å¶éãããŸãã ãã¡ãããXcodeã«ã¯SwiftããµããŒãããã¢ãã¬ã¹ã¢ãã©ã€ã¶ãŒãšã¹ã¬ãããµãã¿ã€ã¶ãŒããããŸããããããã®ããŒã«ã¯éçã¢ãã©ã€ã¶ãŒã§ã¯ãªããã¢ããªã±ãŒã·ã§ã³ã®èµ·åæãã€ãŸãå®è¡æã«ã®ã¿äœ¿çšã§ããŸãã
æœåšçãªã¡ã¢ãªãªãŒã¯ãšã³ãŒãæ§é ã®ãšã©ãŒã®ããã¢ã¯ãã£ãæ€çŽ¢ã«é©ããŠããŸãã
ãã§ã€ãã¹
Faux PasïŒ ééã£ãã¹ããã-Fr. ïŒã¯ãGUIãšCLIã®äž¡æ¹ãåããæåã®ãµãŒãããŒãã£è£œéçã¢ãã©ã€ã¶ãŒã§ãã 䜿çšéå§åŸãã³ãŒãã®å質ã¯èããé«ããªããŸããã ObjCãããžã§ã¯ãã®20ïŒ ãã50ïŒ ã®é ãããã°ãç¹å®ããã®ã«åœ¹ç«ã¡ãŸããã æãèå³æ·±ãã®ã¯ãæåã®èµ·åæã«ããŒã«ã顧客ãææãããšã©ãŒãæ£ç¢ºã«æããã«ããããšã§ãã ããããå®éãéçºè ã®å人çãªè²»çšã§ãã®ããŒã«ãè³Œå ¥ããäŒç€Ÿå šäœããµãŒãã¹ãéå§ãããŸã§åŸ ããªãããšã決å®ãããäž»ãªçç±ã§ããã
æ®å¿µãªããããã¹ãŠã®ååããã®ããŒã«ãç©æ¥µçã«åãå ¥ããããã§ã¯ãããŸãã-ã¢ãã©ã€ã¶ãŒã¯ç¡æã§ãããšä¿¡ããŠãã人ãããã°ãç解ããããªãå€ãã®èšå®ã«ã€ããŠäžæºãèšã人ãããŸãã
äž»ãªæ¬ ç¹ã¯ãSwiftã®ãµããŒãããªãããšã§ãããéçºè ã¯ãŸã ãµããŒããçŽæããŠããŸããããŸã æ¥ä»ãçºè¡šããŠããŸããã
ããã»ã©éèŠã§ã¯ãªãåé¡ã¯ã ã¯ãŒã¯ã¹ããŒã¹ãçŽæ¥ãµããŒããããŠããªãããšã§ããã³ãã³ãã©ã€ã³ïŒã¯ãŒã¯ã¹ããŒã¹ãã§ãã¯ã®æ§æïŒã䜿çšããŠãã§ãã¯ããããåãããžã§ã¯ããåå¥ã«ãã§ãã¯ããå¿ èŠããããŸãã
ãã ããFaux Pasã¯Apple Coding GuidelinesãšççŸããåé¡é åãèŠã€ããŸããã ããšãã°ãinitããã³deallocã§self.propetyã䜿çšãããšã Modern ObjCæ§æ ãNSNotificationCenterãªãã¶ãŒããŒãã¿ããã¡ã³ãã®æ¬ èœãªã©ã®äœ¿çšãæãåºãããŸãã CIã«ç°¡åã«çµ±åã§ããŸãã
JsonãŸãã¯plistã§çæãããã¬ããŒããããèªã¿ããããã®ã«å€æããããšããå§ãããŸãã ã¬ããŒãã«ã¯åé¡ã®è©³çŽ°ãªèª¬æãå«ãŸããã«ãŒã«ãžã®å€éšãªã³ã¯ãæäŸããŸãã æã«ã¯ãå ¬åŒããã¥ã¡ã³ããžã®ãªã³ã¯ã§ã¯ãªããstackoverflowãžã®ãªã³ã¯ãååšãããšããäºå®ã«ãããããããããã¯å€§ããªæ¬ ç¹ã§ã¯ãããŸããã
ããŒã«ã®çµæã®äŸã以äžã«ç€ºããŸãã Xcodeã§ã¢ãã©ã€ã¶ãŒãå®è¡ããŠãåé¡ã®å¯Ÿè±¡ãæ€åºããã«ã¯ãCLIã䜿çšã§ããŸãã
JSONã§æ瀺ãããã¬ããŒããåæããããã«ãFauxPas GUIã«äŒŒããã¬ãŒã³ããŒã·ã§ã³ã®ååé¡ãéžæããã¬ããŒããExcelã§çæããå°ããªã¢ããªã±ãŒã·ã§ã³ãäœæãããŸããã
ã¢ãã©ã€ã¶ãŒã®æ§æã«é¢ããŠãããŒã«ã¯æ¬¡ã®ããã«æ§æãããŸãã
GUIãCLIåŒæ°ãããã³æ§æãã¡ã€ã«ã ç¬èªã®ã«ãŒã«ãäœæããæ¹æ³ã¯èŠã€ãããŸããã§ããã
ãªã¯ãªã³ã
ãã®ã¢ãã©ã€ã¶ãŒã¯ãObjCã§äœæãããå€åœäŒæ¥ã®å°èŠæš¡ã ãé·åœã®ãããžã§ã¯ãã§åããŠäŒã£ãã ãã®äŒç€Ÿã®éçºè ã¯éåžžã«ä¿å®çã§ããã®èšèªã®ãã¹ãŠã®æ°ããããŒãžã§ã³ãžã®ç§»è¡ãè€éã§ãããããSwiftã«åãæ¿ããããããŸããã§ããã
OCLintã§ã¯Scaffoldingã䜿çšããŠã«ãŒã«ãå€æŽããã³è¿œå ã§ããŸãããããã«ã¯æéãããããŸãã ãã®äŒç€Ÿã®éçºããã»ã¹ã«ãããšããã¹ãŠã®ã¢ãã©ã€ã¶ãŒã®èŠåãä¿®æ£ããããŸã§ãã³ãŒãã¯ãªããžããªã«ã³ãããããŸããã äžéšã®æ€èšŒã«ãŒã«ã¯ãåžžã«æ£ããåŠçãããŸããã§ããã ã¢ãã©ã€ã¶ãŒã®èŠåããã¹ãŠæé€ããããã«ãåé¿çïŒã¯ã©ã³ãïŒã䜿çšããå¿ èŠããããããŒã ã¯æçµçã«ãã®ã¢ãã©ã€ã¶ãŒã®ãµããŒããæŸæ£ããŸããã
ããã§ããã¢ãã©ã€ã¶ãŒã§ã¯æ¬¡ã®ããšãèå¥ã§ããŸãã
- åŒã®ãªãif / else / try / catch / finallyã¹ããŒãã¡ã³ãã空ã«ãã
- æªäœ¿çšã®ããŒã«ã«å€æ°ãšãã©ã¡ãŒã¿ãŒ
- é«ã埪ç°çå°é£ãå ±å
- ifã¹ããŒãã¡ã³ããšæªäœ¿çšã®æ¬åŒ§ã䜿çšããŠåé·ã³ãŒãã«åå¿ããŸã
- å¯éããžãã¯ãšå€æ°ã®åå²ãåœãŠãæ€åº
å°ããªãããžã§ã¯ãã®åææéã¯éåžžã«é·ãïŒClangã¢ãã©ã€ã¶ãŒã«æ¯ã¹ãŠïŒããã®ããŒã«ã以åã«ãããžã§ã¯ãã§äœ¿çšããããšããªãå Žåãèšå€§ãªæ°ã®èŠåãçæãããå¯èœæ§ããããåæåæãè€éã«ãªããŸãã ãããã£ãŠãã³ãŒãããŒã¹å šäœããã§ãã¯ããŠå€§éã®èŠåãåãåãå¿ èŠããªãå Žåã¯ãã³ãããåã«å€æŽããããã¡ã€ã«ã®ã¿ããã§ãã¯ããå°ããªã¹ã¯ãªãããäœæã§ããŸããããã¯ãã¢ãã©ã€ã¶ãŒã«é¢é£ããŸãã
ãã«ãã¹ã¯ãªããã«ããXcodeã«æšæºçã«çµ±å ããŸã ã
ãã®ããŒã«ã¯éåžžã«æè»ã§ãããããã«ããããããããã®ããŒã«ã¯é·ãéååšããŠãããããã³ãŒãã®ããé«åºŠãªãã¥ãŒãªã¹ãã£ãã¯åæãå¿ èŠã§ãã çŸåšããã®ã¢ãã©ã€ã¶ãŒã®Xcodeãã©ã°ã€ã³ãå¿ èŠã§ããããã®äœ¿çšãå€§å¹ ã«ç°¡çŽ åãããŸãã
ã³ãŒãããŒã
Codebeatã¯ã©ãŠãã¢ãã©ã€ã¶ãŒã¯ãObjCãšSwiftã®äž¡æ¹ããµããŒãããŠããŸããããã¯ãç¹å®ã®ãããžã§ã¯ãã§äœ¿çšããããã«ãã®è£œåãéžæããããšãã«éèŠã§ããã æ¬ ç¹ã®1ã€ã¯ããã«ãªã¯ãšã¹ãã®åã«ã³ããããGitHubã«å°éããåŸã«ã®ã¿ãã§ãã¯ãå®è¡ãããããšã§ãããããã«ããããã®ã±ãŒã¹ã§ã¯éçºããã»ã¹ããããã«éæ§é åãããŸããã ãã®å·çã®æç¹ã§ãéçºè ã¯ããã®ããã»ã¹ãžã®éçºè ã®åå ãå®å šã«æå°éã«æããããã«ãèªåã¬ãã¥ãŒã³ãŒããŠãŒãã£ãªãã£ããªãªãŒã¹ããããšãçŽæããŸããã ããã¯ã人éã«ããã¬ãã¥ãŒããããããžã§ã¯ãã®éçºããŒã ã§ã®äžèŠåãŸãã¯äžæ³šæãªã³ãŒããã§ãã¯ã®ãããç·æ¥ã®ã¿ã¹ã¯ã§ãã
Swift + Obj-CãPythonãRubyããµããŒãããŠãããã¢ãã€ã«éçºã«éåžžã«äŸ¿å©ã§ãã
ObjCã³ãŒãã®åæã¯ååã«æ©èœããŸããã ããã¯ãå瀟ãäž»ã«Swiftã³ãŒãã®åæã«éç¹ã眮ããŠãããšããäºå®ã«ãããã®ã§ãããObjCãšã®é£æºãæè¿è¿œå ãããŠããããããªãæ¹åãå¿ èŠã§ãã
補åãµããŒãã«é¢ããŠã¯ãäžçªäžã«ãããŸãã æ¥äžã¯åžžã«ãµããŒãã«é£çµ¡ããæ©äŒããããé±æ«ã§ãå¿ èŠãªæ¯æŽãæäŸãããŸããã
ã¡ããªãã¯ã®æ§æã«é¢ããŠã¯ãç¬èªã®jsonãã¡ã€ã«ãäœæããæ€èšŒã«ãŒã«ãå€æŽããããšã§ãããå®è¡ã§ããŸãã ãã ããæ°ããæ€èšŒã«ãŒã«ãäœæããããæ¢åã®æ€èšŒã«ãŒã«ãå€æŽãããããæ©èœã¯ãããŸããã ããããéçºè ãç§ã«ä¿èšŒããããã«ããã®ãããªæ©äŒã¯å°æ¥èšç»ãããŠããŸãã
ãã®ããŒã«ã¯ããªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ã¯ç¡æã§ããã©ã€ããŒããªããžããªã§ã¯äŸ¡æ Œã¯ããã»ã©é«ããããŸãããããã«ããã©ã€ã¢ã«æéã¯3ãæéç¶ããéåžžã«æ°äž»çã§ãããšèŠãªãããšãã§ããŸãã
æšæž¬ãã
ç¬èªã®ã³ãŒãã¢ãã©ã€ã¶ãŒãéãã facebook補åã¯ãiOSã§ã®ãããžã§ã¯ãã®åæã ãã§ãªããAndroid / Javaéçºã«ãé©ããŠããŸãã
ãã¹ããããžã§ã¯ãã®ã³ãã³ãã©ã€ã³ã§ãã®ã¢ãã©ã€ã¶ãŒãããã«å®è¡ããããšã¯ã§ããŸããã§ããããGithubã§ãªã¯ãšã¹ããäœæããåŸããã®æ§æã®ããã€ãã®åŸ®åŠãã«å°å¿µããŸããã ããã«ãã¹ã¯ãªããã®å®è¡ãã䜿çšããŠãXcodeã«çµ±åããããšããã§ããŸããã
ã¢ãã©ã€ã¶ãŒãå®è¡ããããã«ãè¿œå ã®ã¹ããŒã ãäœæãããŸãã-CLIã䜿çšããŠä»ã®ã¢ãã©ã€ã¶ãŒãšåæ§ã«ãXcodeã§æšè«ããŸãã ç¹å®ã®ã±ãŒã¹ã§ã¯ããã®äœ¿çšã«ãã倧ããªå©ç¹ã¯ç¢ºèªãããŠããŸããã ããããããã®ããŒã«ãä»ã®å€§èŠæš¡ãªã¯ãã¹ãã©ãããã©ãŒã ã®è€éãªãããžã§ã¯ãã§äœ¿çšããã®ãçã«ããªã£ãŠããŸãã
ã¹ãŠã£ãããªã³ã
Swiftéçºè ã®éã§éåžžã«äººæ°ã®ããã¢ãã©ã€ã¶ãŒã§ãXcodeã®ãã©ã°ã€ã³ãã©ã°ã€ã³ããããéåžžã«äŸ¿å©ã§ãã
GitHubã®Swift Style Guideãåºæ¬çãªã«ãŒã«ã§ãã æ£èŠè¡šçŸããŒã¹ã®ã«ã¹ã¿ã æ€èšŒã«ãŒã«ãäœæããããšãå¯èœã§ãã ç¹ã«ãæ°ããæ©èœãããŒã«ã¯ã©ã¹ã®æ¡åŒµã«è¿œå ãããå Žåããªãã¡ã¯ã¿ãªã³ã°ã«é¢ããã«ãŒã«ãäœæãããšéåžžã«äŸ¿å©ã§ããããšãã°ãNSLocalizedStringïŒïŒé¢æ°ã¯ã¯ã©ã¹ã®NSStringïŒãŸãã¯StringïŒæ¡åŒµã®ãã£ãŒã«ãã«ãªããŸãã
ç¹å®ã®ã±ãŒã¹ã§ã¯ãããŒã ã¯ãªãã¡ã¯ã¿ãªã³ã°ãããŠããªãåæ£ãã©ã³ãã«åãçµã¿ãŸããã ãèªåä¿®æ£ããªãã·ã§ã³ã䜿çšãããšãã³ãŒããåäžã®ãã©ã³ãã«ããŒãžãããšãã«ãã³ãŒããç°¡åã«åäžã®ã¹ã¿ã€ã«ã«ããããšãã§ããŸãã
SwiftLintã¯ãObjCã³ãŒããšSwiftã³ãŒãã®äž¡æ¹ãå«ã倧èŠæš¡ãªãã€ããªãããããžã§ã¯ãã§äœ¿çšãããŸããã æ®å¿µãªããããããžã§ã¯ãã«ãããå°å ¥ãããšããã¢ã€ãã¢ã®èè ã¯ããautocorrectããªãã·ã§ã³ã䜿çšããå Žåã®å€é·ã«é¢ããèšäºãèªãã§ããããXcodeã®ãRun Scriptãã«ãã§ãã¯ãæ¿å ¥ããŸããã ãã¡ãããå ±éã®åæãã€ã³ããæããªãããŒã ãæã€å€§èŠæš¡ãªãããžã§ã¯ãã§ã¯ãå šå¡ããã®ããŒã«ãããã«ã€ã³ã¹ããŒã«ããããã§ã¯ãããŸããã åæã«ãSwift 3.0ãžã®ç§»è¡ããããééããªãæ°ããã³ãããã«æ··ä¹±ãå ããŸããã
ããŒãžã§ã³0.16.0以éã誀æ€ç¥ã®ã«ãŒã«ãããã€ããããŸãããããšãã°ã large_tupleãããžã§ã¯ãã§ã¯ãã«ãã¹ã¯ãªããã«ããã³ã³ãã€ã«ãåæ¢ããŠããŸããã ããã«ããã¹ãŠã®ã«ãŒã«ãæ£ããåŠçãããããã§ã¯ãããŸãããããã¯å€ãã®ã¢ãã©ã€ã¶ãŒã§ããèŠãããããšã§ãããã³ãŒãã®å質ã«åœ±é¿ãäžããåé¿çã䜿çšããããåŸãŸããã ãã®åé¡ã«ãããåãããžã§ã¯ãã®ããã«ããã§ãŒãºã¹ã¯ãªãããã«SwiftLintãå°å ¥ããããšã«ã€ããŠãããæ éã«ãªããŸããã
ãã®ããŒã«ã¯Jenkinsã«ãçµ±åãããŠããããããžã§ã¯ãã³ãŒãããŒã¹ã®å¶åŸ¡ãæããã«æ¹åãããŸããã
ä»ç«ãŠ
Tailorã¯ãSwiftçšã®ã¯ãã¹ãã©ãããã©ãŒã ã®éçã¢ãã©ã€ã¶ãŒã§ãã éåžžã«çããã®ã¯ãWindowsãã©ãããã©ãŒã ããµããŒããããŠãããšããäºå®ã§ãã
ãã€ããããããžã§ã¯ãã§SwiftLintã®ä»£æ¿ãšããŠäœ¿çšãããŸãã ãã ãããã®æéã¯ãSwift 2ã®ã¿ããµããŒãããŸããSwift2ã¯ãçŸä»£ã®èŠä»¶ãå°ãæºãããŠããŸããã ãã ããSwift 3.0.1ããµããŒããããšã³ãã£ã³ãã®åé¡ããããŸãã The Swift Programming LanguageãGitHubãRay Wenderlichãããã³Courseraã®ã³ãŒãã¹ã¿ã€ã«ã«ãŒã«ããµããŒãããŸãã
ããããšã¯ãŒã¯ã¹ããŒã¹ããµããŒãããã«ã¯ ã次ã®æšå¥šäºé ããå§ãããŸãã
ç¬èªã®ã«ãŒã«ãäœæããæ©èœã¯èŠã€ãããŸããã§ããããååšããå¯èœæ§ããããŸãããããã泚ææ·±ãç解ããå¿ èŠããããŸãã
ããã«ãã¹ã¯ãªããããä»ããŠXcodeã«çµ±åããŸãã trailing-whitespaceãªã©ã®èŠåãæå¶ããã«ã¯ãæåã«äœ¿çšãããšãã«ããã«äžäŸ¿ã«ãªããŸãã
ããŒãæšå¥šãããŸãïŒ
tailor --except=brace-style,trailing-whitespace
å¿ èŠã«å¿ããŠãã¬ããŒããHTMLãJSONããŸãã¯Xcode圢åŒã§åºåã§ããŸããããã¯ãWebãµãŒããŒã§çµæãå ¬éãããšãã«CIã§äœ¿çšããã®ã«åå䟿å©ã§ãã
Swiftã¹ã¿ã€ã«ã§ã®æžåŒèšå®
ã¢ãã©ã€ã¶ãŒã«ã€ããŠèšãã°ãç¹å®ã®ã¹ã¿ã€ã«ã¬ã€ãã®ã³ãŒãã®ããã©ãŒããã¿ãŒãã«èšåãããããããŸããã
éçã³ãŒãã¢ãã©ã€ã¶ãŒã§ã¯ãªããã³ãŒããSwift Styleã«ãã©ãŒãããããŸãããããã§ããããã°ã©ããŒãã³ãŒããããããç解ã§ããããã«ã³ãŒããåäžã®ã¹ã¿ã€ã«ã«ããããšã«ããããšã©ãŒãæ€åºãããšããåãç®çãæãããŸããã³ãŒãã®ã»ã¯ã·ã§ã³ã
ã¹ã€ãããã©ãŒããã
ç¹å®ã®ããŒã ã®ã³ãŒãã¹ã¿ã€ã«ãæºããç¬èªã®ã«ãŒã«ãäœæã§ãããšããç¹ã§äŸ¿å©ã§ãã èšå®ã¯CLIãä»ããŠè¡ãããŸããããã¹ãŠã®äººã«ãšã£ãŠé åçã§ã¯ãããŸããã ãã ããXcodeã®ãã©ã°ã€ã³ãšããŠã€ã³ã¹ããŒã«ã§ããŸãã
ã¹ãŠã£ããã
ãã®ããŒã«ã¯ãCLIãšXcodeæ¡åŒµã®äž¡æ¹ã§äœ¿çšã§ããŸãã ããã¯ç¢ºãã«åªããããŒã«ã§ãããXcodeã䜿çšãããšã¯ã©ãã·ã¥ããé倧ãªãã°ãããã€ãå«ãŸããŠããŸãã ãã ããéçºè ã¯ããã«ããããåé€ããŸãã ç¬èªã®æ€èšŒã«ãŒã«ãè¿œå ããæ©èœããããŸãã
ç¹å®ã®ã±ãŒã¹ã§ã¯ãå°ããªãããžã§ã¯ãã®ã³ãŒãããã©ãŒãããããããã«äœ¿çšãããå©äŸ¿æ§ãšçµæã®ç¹ã§æé«ã§ããããšã蚌æãããŸããã
ã©ã¡ãã®ãã©ãŒããã¿ãXcodeã®æ¡åŒµæ©èœãšããŠäœ¿ãããããçŸåšãµããŒãããã³æ¹åãããŠããŸãã
ãã§ãã¯ãã«ã¯ã¹
å®éã«ã¯ã補åã®å®å šæ§ãéèŠãã顧客ããã®ãããžã§ã¯ããæã ãããŸãã ãã®ãããªãããžã§ã¯ãã§ã¯ãCheckmarxã®éçã¢ããªã±ãŒã·ã§ã³ã»ãã¥ãªãã£ãã¹ãïŒSASTïŒãœãŒã¹ã³ãŒãç£æ»ãœãªã¥ãŒã·ã§ã³ã䜿çšããããšããå§ãããŸãã
ãã®ã¯ã©ãŠããœãªã¥ãŒã·ã§ã³ãã€ãŸãããŒã«ã¯ãããŒã«ã«éçºãµãŒããŒãŸãã¯CheckmarxãµãŒããŒã«é 眮ã§ããŸãã ç¬èªã®ç¹èš±æè¡ã䜿çšããããªãé«åºŠãªåæè£ çœ®ã 以åã«ç±³åœåœé²ç·çãšç·å¯ã«é£æºããŠããCheckmarxã¯ãããããçš®é¡ã®è匱æ§ã®ç 究ã«é¢ããŠå€ãã®èå³æ·±ãé²å±ãéããŠããŸãã SwiftããµããŒãããŠããŸãããç¹å®ã®ã±ãŒã¹ã§ã¯ãObjCãããžã§ã¯ããåæãããŸããã æ®å¿µãªãããXcodeã®æ¡åŒµãã©ã°ã€ã³ã¯ãããŸããã
å ±åã·ã¹ãã ã¯éåžžã«æçã§ãããèŠããããªã£ãŠããŸãã ããŒãžã®1ã€ã¯ä»¥äžã§ãã
æçãªã¬ããŒãã«ã¯ããããžã§ã¯ãã«å¿ããŠ10ã300ããŒãžãå«ããããšãã§ããŸãã ã¬ããŒãã§ã¯ãåé¡ã®ä¿®æ£æ¹æ³ã«ã€ããŠã説æããäŸã瀺ããŠããŸãã åæããããã¹ãŠã®ãããžã§ã¯ãã®äžè¬çãªééãã¯ãããµãŒãããŒãã£ããŒããŒã察å¿ãã§ãããããã¯ãiOSçšã®ãµãŒãããŒãã£ããŒããŒããã€ã³ã¹ããŒã«ããéã®è匱æ§ã«é¢é£ããŠããŸããïŒãã ããåæãããã¢ããªã±ãŒã·ã§ã³ã®1ã€ã«ããŒããŒãå ¥åãã£ãŒã«ããå«ãŸããŠããŸããã§ããïŒã
ããšãã
Sonarã®ãããªãå®éã®éçã³ãŒãåæã®ããã€ãã®ããŒã«ã«ã€ããŠç¥ããããšæã£ãŠããŸãã ãã ãã補åã®ã³ã¹ããé«ããã€ã³ã¹ããŒã«ãè€éã§ããããããã®ãããªæ©äŒã¯ãŸã ãããŸããã åæã«ãäžéšã®ãããžã§ã¯ãã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ã»ãã¥ãªãã£ãå¿é ãªã客æ§ã®ã³ãŒãã®è匱æ§ãæ¢ãããã«Solar inCodeãè©Šãããšã¯èå³æ·±ãã§ãã æ®å¿µãªããããã®è£œåã¯ãã¢çã§ãå ¥æã§ããŸããã§ããã
äžèšã®ããŒã«ã®å€ãã¯ãã³ãŒãã®ããŸããŸãªè匱æ§ã«å¯Ÿãã補åã®å®å®æ§ãšèæ§ãé«ããã®ã«åœ¹ç«ã¡ãŸããã ååãšããŠãã¢ãã©ã€ã¶ãŒã¯åèŠã®ãªãè£å€å®ã§ãããããªãã®ããšãæ°ã«ããã圌ã«å¯Ÿããå人çãªèŠæ ããããŸããã
ããã«ãããããããçæ³çãªããŒã«ãååšããªãããšã¯æããã§ãããæ¢åã®ãã¹ãŠã®ã³ãŒãåæããŒã«ã䜿çšããŠãäžèœè¬ã§ã¯ãããŸããã ã¢ãã©ã€ã¶ãŒã®èŠä»¶ãæºããããã«åé¿çã䜿çšããå¿ èŠãããå Žåã誀ã£ãã¢ã©ãŒã ã®ã±ãŒã¹ã¯èšããŸã§ããããŸããã ãã®ç¹ã§ãå°ãªããšããdrugStateãcacheDataã®ä»£ããã«dragStateãªã©ã®ã»ãã³ãã£ãã¯ãšã©ãŒãæ€åºããããã«ã人éã®ã¬ãã¥ãŒã¯åžžã«é¢é£æ§ããããŸãïŒauto-replace ...ãæ§æã§ããŸããïŒã
䟿å©ãªãªã³ã¯
- OCLintã䜿çšããéçåæ
- éçã¢ãã©ã€ã¶ãŒã®ããã€ã¹ãšåäœåç
- éçåæã®ã¬ã€ãã
- éçã¢ãã©ã€ã¶ãŒãæ倧éã«æŽ»çšãã
- ããªãã®èšèªãèŠãŠãã ããïŒïŒSwiftLintã§ã³ãŒãããããã«ããé
- ã¹ã¬ãããµãã¿ã€ã¶ãŒãšéçåæ
- Xcodeã䜿çšãããããã°ã«ã€ããŠ
- SonarQubeãã©ãããã©ãŒã ã䜿çšããŠã³ãŒãã®å質ã管çããŸã
- ããŒã éçºã«ãããéçã³ãŒãåæã®å®æçãªäœ¿çš