RuboCop 0.87 ããªãªã¼ã¹ãããã
ä»åã®ç®ç㯠rubocop -a
ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã¸ã®éäºæå¤æ´ã¨ãªãã
ããã¾ã§ã¯ rubocop -a
ãªãã·ã§ã³ (rubocop --auto-correct
ãå義) ã使ã£ãå ´åã«ãèªåä¿®æ£ãåãããã¹ã¦ã® Cop ãé©ç¨ãããã¦ããããã®ãã Safe ã§ãªãã¨è¦ãªããã Cop ã®èªåä¿®æ£ãé©ç¨ãããã¨ããã®ãããã©ã«ãã®æ¯ãèãã ã£ãã
ä»åã®ãªãªã¼ã¹ãã㯠rubocop -a
㯠Safe ã¨ãã¼ã¯ããã¦ãã Cop ã®ã¿ãèªåä¿®æ£ã®å¯¾è±¡ã¨ãªããå¾æ¥ã©ããèªåä¿®æ£ãåãã Unsafe ãå«ããã¹ã¦ã® Cop ãé©ç¨ããå ´å㯠rubocop -A
(rubocop --auto-correct-all
) ãå®è¡ãããã¨ã«ãªããã¤ã¾ã RuboCop 0.59 ã§å°å
¥ããã rubocop --safe-auto-correct
ãèªåä¿®æ£ã®ããã©ã«ãã®æ¯ãèãã«ãªã (ãã㦠rubocop --safe-auto-correct
ãªãã·ã§ã³èªä½ã¯éæ¨å¥¨ã«ãªãã¾ãã) ã
RuboCop ã«å°å ¥ããã¦ãã Safe ã¨ããã¡ã¿ãã¼ã¿ã«ã¤ãã¦ã¯éå»ã®æ¥è¨ãåç §ãã¦ãã ããã