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

ミススペルを発見するmisspellのご紹介 / Introduce misspell

120b74af626c2b23f954926ef68ac5d6?s=47 papix
January 19, 2021

ミススペルを発見するmisspellのご紹介 / Introduce misspell

120b74af626c2b23f954926ef68ac5d6?s=128

papix

January 19, 2021
Tweet

Transcript

  1. ϛεεϖϧΛൃݟ͢Δ misspellͷ͝঺հ 2021/1/19 ٢঵ࣉ.pm #25 - papix

  2. ࣗݾ঺հ • papix (id:papix / @__papix__) • גࣜձࣾ͸ͯͳ WebΞϓϦέʔγϣϯΤϯδχΞ (2017೥ʙ)

    • ϒϩάMediaνʔϜ → ϚϯΨνʔϜ • Ұൠࣾஂ๏ਓJapan Perl Associationཧࣄ • ϒϩά: https://papix.hatena(blog.(com|jp)|diary.jp)
  3. ࠓ೔͸misspellͷ࿩Λ͠·͢

  4. client9/misspell • https://github.com/client9/misspell • Go੡ͷπʔϧ • ӳޠͷϛεεϖϧΛൃݟͯ͘͠ΕΔ܅

  5. ͜Μͳ͜ͱ͋Γ·ͤΜ͔?

  6. ͜Μͳ͜ͱ͋Γ·ͤΜ͔? • ม਺໊Λtypo͍ͯͨ͠...! • ެ։͢ΔAPIυΩϡϝϯτʹtypo͕͋ͬͨ...! • σʔλϕʔεͷschemaʹtypo͕͋ͬͨ...!

  7. ͦΜͳ͋ͳͨʹmisspell!

  8. misspellͰൃݟ͢Δ $ go get -u github.com/client9/misspell/cmd/misspel l $ cat sample.tx

    t - TOOD: typo͕ͳ͍͔֬ೝ͢Δ $ misspell . sample.txt:1:2: "TOOD" is a misspelling of "TODO " $ vim sample.txt # मਖ਼͢Δ.. . $ cat sample.tx t - TODO: typo͕ͳ͍͔֬ೝ͢Δ $ misspell . # ϛεεϖϧ͕ͳ͍ͷͰԿ΋ग़ྗ͸ͳ͍
  9. ߋʹ...

  10. reviewdog/action-misspell

  11. ศར!!!

  12. ༨ஊ: ࣮ࡍʹݟ͔ͭͬͨϛεεϖϧୡ • ໨ࢹͩͱؾ͖ͮʹ͍͘, ͜ΜͳϛεεϖϧΛൃݟ͠·ͨ͠ • cannnot → cannot •

    recomended → recommended • occured → occurred • minumum → minimum • comparision → comparison
  13. ༨ஊ: occured? occurred? • weblioӳ࿨ࣙయΛݟΔͱ... • occured = occurͷաڈܗ, աڈ෼ࢺܗͱ͋Δ

    • https://ejje.weblio.jp/content/occured
  14. ༗ࣝऀͷݟղ

  15. ·ͱΊ • typoͳͲʹΑΔϛεεϖϧΛൃݟ͢ΔmisspellΛ঺հ͠·ͨ͠ • reviewdogͱ࿈ܞ͢Δͱ, Pull Requestʹࣗಈతʹࢦఠͯ͘͠Ε·͢ • ϛεεϖϧ͸୭Ͱ΋΍ͬͯ͠·͏΋ͷ... •

    ͔͠͠, ͦͷ··࢒͍ͬͯΔͱࠞཚͷݩʹͳΓ͕ͪ • ͏·͘πʔϧΛ࢖ͬͯൃݟ, मਖ਼͍͖ͯ͠·͠ΐ͏!