Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contribution Hatching: By RuboCop

Contribution Hatching: By RuboCop

iCARE Dev Meetup #32 (2022-04-20)

023b04c98f39cc041293d780352432ff?s=128

Koichi ITO

April 20, 2022
Tweet

More Decks by Koichi ITO

Other Decks in Programming

Transcript

  1. @koic Contribution Hatching By RuboCop

  2. ,PJDIJ*50 !LPJD w 044QSPHSBNNFS w 3VCP$PQDPSFUFBN w )FBENBJOUBJOFSPG3VCP$PQ3BJMT  3VCP$PQ1FSGPSNBODF

    BOE 3VCP$PQ.JOJUFTU w &OHJOFFSJOH.BOBHFSBOE %JTUJOHVJTIFE&OHJOFFSPG&4. *OD
  3. &4. *OD

  4. None
  5. w +BWB4DSJQU1SFUUJFS &4-JOU w (P(PGNU w 3VTU3VTUGNU $MJQQZ w 3VCZ3VCP$PQ

    4UBOEBSE BOE PUIFST -JOUFS'PSNBUUFS
  6. #VOEMFS 1SZ 34QFD 3VCP$PQ CZFCVH 3VCZ,BJHJ %3&$0.CPPUI

  7. None
  8. 3VCP$PQDPSFEFWFMPQFST +0900 UTC+0200 +0300 +0800 -0400 .PSFUIBODPOUSJCVUPSTJOZFBST

  9. 3VCP$PQDPSFEFWFMPQFST +0900 UTC+0200 +0300 +0800 -0400 .PSFUIBODPOUSJCVUPSTJOZFBST "VUIPS

  10. 5IFpSTUDPNNJU % git log -p --reverse commit afbead34db54506c12a21dbd4ce04fada0f8b9a4 Author: Bozhidar

    Batsov <bozhidar@batsov.com> Date: Sat Apr 21 13:06:42 2012 +0300 Initial commit to rubocop. --- .document | 5 +++++ .gitignore | 49 +++++++++++++++++++++++++++++++++++++++ ++++++++++ .rspec | 1 + Gemfile | 16 ++++++++++++++++ LICENSE.txt | 20 ++++++++++++++++++++ README.rdoc | 19 +++++++++++++++++++ Rakefile | 45 +++++++++++++++++++++++++++++++++++++++ ++++++ features/rubocop.feature | 9 +++++++++ features/step_definitions/rubocop_steps.rb | 0 features/support/env.rb | 13 +++++++++++++
  11. 5IFpSTUDPNNJU % git log -p --reverse commit afbead34db54506c12a21dbd4ce04fada0f8b9a4 Author: Bozhidar

    Batsov <bozhidar@batsov.com> Date: Sat Apr 21 13:06:42 2012 +0300 Initial commit to rubocop. --- .document | 5 +++++ .gitignore | 49 +++++++++++++++++++++++++++++++++++++++ ++++++++++ .rspec | 1 + Gemfile | 16 ++++++++++++++++ LICENSE.txt | 20 ++++++++++++++++++++ README.rdoc | 19 +++++++++++++++++++ Rakefile | 45 +++++++++++++++++++++++++++++++++++++++ ++++++ features/rubocop.feature | 9 +++++++++ features/step_definitions/rubocop_steps.rb | 0 features/support/env.rb | 13 +++++++++++++ 👈
  12. UI"OOJWFSTBSZ🎉

  13. 3VCP$PQDPSFEFWFMPQFST +0900 UTC+0200 +0300 +0800 -0400 .PSFUIBODPOUSJCVUPSTJOZFBST .F

  14. .BJOUBJO3VCP$PQ)2&WFSZ%BZ

  15. .F

  16. @koic Contribution Hatching By RuboCop

  17. 8IBUJT$POUSJCVUJPO)BUDIJOH

  18. $POUSJCVUJPOJT/05TFMGTBDSJpDF $POUSJCVUJPO What is life all about?

  19. w +PIO.BUUIFX7MJTTJEFT w 0OFPGUIF(BOHPG'PVS w 1BUUFSOTBSFEJTDPWFSFE  OPUJOWFOUFE )BUDIJOH

  20. #Z3VCP$PQ

  21. w"OZQSPHSBNNBZIBWFBCVH w3VCP$PQEPFTOPULOPXNPSF BCPVUUIFTFNBOUJDTPGZPVS QSPHSBNUIBOZPVEP w-JOUFSJTOPUPNOJQPUFOU -JOUFSWT1SPHSBNNFS

  22. w 3VCP$PQTJTTVFT w 4UBOEBSETJTTVFT w 1SPQSJFUBSZDPEFEFWFMPQFEBUXPSL w .ZMPDBMSFQPTJUPSZ w 044GSJFOET

    )PXUPHFUGFFECBDL
  23. w 3VCP$PQTJTTVFT w 4UBOEBSETJTTVFT w 1SPQSJFUBSZDPEFEFWFMPQFEBUXPSL w .ZMPDBMSFQPTJUPSZ w 044GSJFOET

    )PXUPHFUGFFECBDL 1JDLVQ
  24. "CPVUNZEFWFMPQNFOU FOWJSPONFOUUIBUNBLFT 3VCP$PQNPSFTUBCMF

  25. w$IFDL044 FHSBJMTSBJMT  SFQPBOEQSPQSJFUBSZ BQQMJDBUJPOSFQPGPS OPXBSOTBOEOPFSSPST 5SZXJUIQSBDUJDBMSFBMXPSMEDPEF

  26. HIRYHFNTSD Basic equipment 

  27. YNPUFNFNHIR

  28. YNPUFNFNHIR 👈 6TFghq getJOTUFBEPGgit clone

  29. /VNCFSPGNZMPDBMSFQPTJUPSJFT % ghq list (snip) github.com/rails/spring github.com/rails/actionmailbox github.com/rails/rails (snip) github.com/rust-lang/rust

    (snip) % ghq list | wc -l 1586
  30. BNBUTVEBHFNTSD

  31. w "SCFOWQMVHJO w (FUTPVSDFDPEFXJUIgit cloneBMPOH XJUIUIFSVOUJNFHFNXJUIgem install  bundle install

    w (FUEFQFOEFODZDPEF BTWBSJFUZDPEF  w #ZMJOLJOHXJUIghq SFQPTJUPSZ NBOBHFNFOUDBOCFDFOUSBMJ[FE HFNTSD
  32. %FNP % gem install solargraph Fetching solargraph-0.43.0.gem Fetching reverse_markdown-2.0.0.gem Fetching

    kramdown-parser-gfm-1.1.0.gem Fetching jaro_winkler-1.5.4.gem Fetching e2mmap-0.1.0.gem Fetching backport-1.2.0.gem clone http://github.com/xijo/reverse_markdown -> /Users/koic/src/ github.com/xijo/reverse_markdown git clone --recursive http://github.com/xijo/reverse_markdown /Users/koic/src/github.com/xijo/reverse_markdown Cloning into '/Users/koic/src/github.com/xijo/reverse_markdown'... warning: redirecting to https://github.com/xijo/reverse_markdown/ remote: Enumerating objects: 1377, done. remote: Total 1377 (delta 0), reused 0 (delta 0), pack-reused 1377 Receiving objects: 100% (1377/1377), 203.40 KiB | 749.00 KiB/s, done. Resolving deltas: 100% (796/796), done.
  33. 6TFFEHF3VCP$PQXJUI 044BOEQSPQSJFUBSZ 

  34. SFQP(FNpMF # frozen_string_literal: true source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git"

    } gemspec # Use the latest RuboCop with the path option # (my local RuboCop code is mostly up to date 😀). # And it will be convenient to manage with ghq because # you do not have to worry about the value of path. gem 'rubocop', path: '/Users/koic/src/github.com/rubocop/rubocop'
  35. SFQPSVCPDPQZNM AllCops: # Include pending cop. EnabledByDefault: true # Include

    cop that works only with new Ruby syntax. TargetRubyVersion: 3.2 # Suppress `An AutocorrectNotice must be defined in your RuboCop config` warn. Style/Copyright: Enabled: false
  36. &YBNQMFT

  37. 'SPN1SPQSJFUBSZ Contribution Hatching

  38. SVCPDPQSVCPDPQ 'JYBOJODPSSFDUBVUPDPSSFDUGPS-BZPVU-JOF-FOHUI

  39. $PSOFSDBTF

  40. None
  41. 3FGFSFODFPUIFSUPPMT Contribution Hatching

  42. w +BWB4DSJQU1SFUUJFS &4-JOU w (P(PGNU w 3VTU3VTUGNU $MJQQZ w 3VCZ3VCP$PQ

    4UBOEBSE BOE PUIFST -JOUFS'PSNBUUFS
  43. IUUQTHJUIVCDPNQSFUUJFSQMVHJOSVCZ

  44. w 3VCP$PQTBVUPDPSSFDUJPO NBLFTBOJOWBMJE3VCZDPEF🤦 w 5ISFFDPOUSJCVUJPOTXFSFIBUDIFE w   BOE 3VOrubocop

    -A
  45. <&/>HJUIVCDPNSVCPDPQSVCPDPQ <+">HJUIVCDPNSVCPDPQSVCPDPQKQ You may also encounter unexpected analyzing. Please give

    us your feedback. So you can start with an issue: %POU1BOJD
  46. Contribution opportunities are anywhere!

  47. One more thing…

  48. PSJHJOYVQTUSFBN Sapir-Whorf hypothesis

  49. %PZPVVTFHJUDPNNBOEUIFTBNF CFUXFFOEBZUJNFXPSLBOE044 ?

  50. PSJHJOBOEVQTUSFBN PSJHJO %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM 3FRVFTU

    1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIPSJHJOIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE git pushPQFSBUJPODBOCFDPOTJTUFOUCZTQFDJGZJOHheadJOTUFBEPGcurrent-branchOBNF
  51. PSJHJOBOEVQTUSFBN PSJHJO %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM 3FRVFTU

    1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIPSJHJOIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE git pushPQFSBUJPODBOCFDPOTJTUFOUCZTQFDJGZJOHheadJOTUFBEPGcurrent-branchOBNF
  52. PSJHJOBOEVQTUSFBN PSJHJO VQTUSFBN %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM

    3FRVFTU 1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE "EESFTTUIFTBNF63-BTPSJHJO HJUSFNPUFBEEVQTUSFBNAHJUDPOpHHFUSFNPUFPSJHJOVSMA 👈5JQ
  53. .BLFUIFTBNFqPX PSJHJO VQTUSFBN %BZUJNFXPSL MPDBM PSJHJO MPDBM 044 VQTUSFBN 1VMM

    3FRVFTU 1VMM 3FRVFTU HJUQVMM HJUQVTI HJUQVMM HJUQVTI 'PSL HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE HJUQVMMPSJHJONBTUFS HJUQVTIVQTUSFBNIFBE "EESFTTUIFTBNF63-BTPSJHJO HJUSFNPUFBEEVQTUSFBNAHJUDPOpHHFUSFNPUFPSJHJOVSMA 👈5JQ QSJWBUFSFQP QVCMJDSFQP
  54. 5PPMVTBHFQSPWJEFTUIJOLJOH IBCJUTUIBUBGGFDUDPHOJUJPO🤔

  55. w 3VCP$PQTJTTVFT w 4UBOEBSETJTTVFT w 1SPQSJFUBSZDPEFEFWFMPQFEBUXPSL w .ZMPDBMSFQPTJUPSZ w 044GSJFOET

    )PXUPHFUGFFECBDL
  56. 044EFWFMPQFSTBSF BUUSBDUFEUPFBDIPUIFS

  57. Support OSS community

  58. 4PGUXBSFJTNBEFGPSQFPQMFCZQFPQMF ,FOKJ)JSBOBCF$&0BU&4. *OD

  59. 8&"3&)*3*/(ʂ agile.esm.co.jp

  60. 'SFFZPVSTFOTF