Otemachi.rb #9 RuboCop

8b3f1b20986cc7aa484c18da9affdc18?s=47 Ryo Nonoyama
September 18, 2018

Otemachi.rb #9 RuboCop

大手町.rb #9 にてRuboCopについて発表した際のスライドです。
簡単なRuboCopの紹介と、実際にRuboCopを導入しているリポジトリの運用経験から学んだことをまとめました。

Otemachi.rb #9
https://enechange-meetup.connpass.com/event/99946/

RuboCop Docs
https://rubocop.readthedocs.io/en/latest/

8b3f1b20986cc7aa484c18da9affdc18?s=128

Ryo Nonoyama

September 18, 2018
Tweet

Transcript

  1. 1.

    . #

  2. 2.
  3. 3.

      • 3ZP/POPZBNB • -JRVJE *OD JOେखொ • 3VCZ3BJMT

    d • ւ֎޲͚ੜମೝূܾࡁαʔϏε։ൃ
  4. 8.

    

  5. 12.

      • 3VCZͰॻ͔ΕͨίʔυΛ੩తղੳͯ͘͠ΕΔπʔϧ IUUQTHJUIVCDPNSVCPDPQIRSVCPDPQ • ओʹҎԼͷ෼ྨ͝ͱʹղੳ݁ՌΛϑΟʔυόοΫͯ͘͠ΕΔ • 4UZMF •

    ίʔυελΠϧͷҰ؏ੑ͕͋Δ͔ʁ • ଟ͘ͷϧʔϧ͸3VCZ4UZMF(VJEFʹج͍͍ͮͯΔ • -JOU • ᐆດͳίʔυ΍ɺΤϥʔΛىͦ͜͠͏ίʔυ͕ͳ͍͔ʁ • .FUSJDT • ϝιουͷ௕͞ͳͲ͕ᮢ஋Λ௒͑ͯͳ͍͔ʁ
  6. 14.

          • ࣗಈͰίʔυΛमਖ਼͢Δػೳ • ༗ޮͳέʔεͱɺແޮͳέʔε͕͋Δ

    • 4UZMFׂ͘Β͍  • -JOUׂ͘Β͍  • .FUSJDT͢΂ͯແޮ  3VCPDPQυΩϡϝϯτ͔ΒҾ༻ɿ͋ΔέʔεͷྫɻσϑΥϧτͰ༗ޮ͕ͩɺࣗಈमਖ਼ʹ͸ඇରԠ IUUQTSVCPDPQSFBEUIFEPDTJPFOMBUFTUDPQT@NFUSJDTNFUSJDTMJOFMFOHUI
  7. 16.

    SVCPDPQҎ֎ʹ΋ɺίʔυͷ੩తղੳΛͯ͘͠ΕΔϥΠϒϥϦ͕͋Δ • IBNMMJOUTMJNMJOU • )5.-UFNQMBUFFOHJOF༻ • TDTTMJOU • 4$44༻ •

    SBJMT@CFTU@QSBDUJDFT • 3BJMTʹಛԽ • CSBLFNBO • ηΩϡϦςΟ؍఺ • DPGGFFMJOU • $PGGFF4DSJQU༻
  8. 22.

        • 3BJMTͰࣗಈੜ੒͞ΕΔίʔυ • ECTDIFNBSC • ECNJHSBUF

     • ECGJYUVSFT  • υϝΠϯ֎ͷίʔυ΍࣮ߦϑΝΠϧ • CJO • MJC • WFOEPS 
  9. 24.

        .FUSJDT"CD4J[F σϑΥϧτ  ͰؤுΖ͏ͱ͕ͨ͠ ϦϑΝΫλ͕ݫ͍ͨ͠Ίʹɻ ͦͷޙʹɺ8BSOJOH๾໓࡞ઓʹΑͬͯGBMTFԽɻ

    .FUSJDT $ZDMPNBUJD$PNQMFYJUZ ͜Ε΋8BSOJOH๾໓࡞ઓʹΑͬͯGBMTFԽʜ .FUSJDT 1FSDFJWFE$PNQMFYJUZ .FUSJDT999-FOHUI 4UZMF#MPDL%FMJNJUFST 3TQFDܥͷϑΝΠϧ͸ର৅͔Βআ֎ɻ ಡΈ΍͢͞Λߟྀɻ
  10. 26.

    6 2 • ظؒ • ೥݄ʙ೥্݄०͘Β͍ • ର৅ • SVCPDPQ

    IBNMMJOU TDTTMJOU DPGGFFMJOU  CSBLFNBO SBJMT@CFTU@QSBDUJDFT • ૯਺ •   ճ
  11. 27.

    2 2 ճ -JOFJTUPPMPOH 4UZMF-JOF-FOHUI ճ 1SFGFSTJOHMFRVPUFETUSJOHTXIFOZPVEPOUOFFETUSJOH JOUFSQPMBUJPOPSTQFDJBMTZNCPMT 4UZMF4USJOH-JUFSBMT ճ

    "MJHOYYY 4UZMF"MJHO1BSBNFUFST -BZPVU#MPDL"MJHONFOU FUDʜ ճ *ODPSSFDUJOEFOUBUJPOEFUFDUFE 4UZMF$PNNFOU*OEFOUBUJPO ճ .JTTJOHTQBDFBGUFS 4UZMF4QBDF*OTJEF#MPDL#SBDFT ճ 3FEVOEBOUDVSMZCSBDFTBSPVOEBIBTIQBSBNFUFS 4UZMF#SBDFT"SPVOE)BTI1BSBNFUFST
  12. 28.

        3VCPDPQ 4UZMF(VBSE$MBVTF 6TFBHVBSEDMBVTFJOTUFBEPGXSBQQJOHUIF DPEFJOTJEFBDPOEJUJPOBMFYQSFTTJPO • ৚݅෼ذͷ෦෼͸ɺ

    ෳࡶʹͳΕ͹ͳΔ΄ ͲόάͷԹচʹ • ͏͔ͬΓJGFMTFͰω ετΛਂ͕ͪ͘͠ • ΨʔυઅΛ࢖ͬͯɺ ৚݅෼ذͷωετΛ ઙ͘ɺγϯϓϧʹ͠ ͍ͯ͘
  13. 32.

    3 2 - • 3VCZΒ͍͠ίʔσΟϯάͷ͓࡞๏Λɺઌਓ͕ੵΈॏͶͨ ஌ܙΛआΓֶͯ΂Δ͜ͱ • 3VCP$PQͷϦϑΝϨϯεோΊͯΔ͚ͩͰ΋;Ή;Ήͬͯ ͳָ͍ͬͯ͠ʢݩؾͳͱ͖͸ʣ •

    ࣗવͱؾΛ͚ͭΔϙΠϯτ͕਎ʹ͍ͭͯɺ҆৺ͯ͠ίʔυ ͕ॻ͚ΔΑ͏ʹͳͬͨ͜ͱ " $#!   
  14. 33.