Linterを使って快適なチーム開発をしよう!

9d1961575e45a8286cdde5f86dbba312?s=47 akatsuki174
February 20, 2016

 Linterを使って快適なチーム開発をしよう!

Linterを使って快適なチーム開発をしよう!

9d1961575e45a8286cdde5f86dbba312?s=128

akatsuki174

February 20, 2016
Tweet

Transcript

  1. LinterΛ࢖ͬͯ շదͳνʔϜ։ൃΛ͠Α͏ʂ @akatsuki174

  2. ࣗݾ঺հ • ๭ιϑτ΢ΣΞձࣾΤϯδχΞ(2೥໨) άϩʔεϋοΧʔ → WebΤϯδχΞ → iOSΤϯδχΞ • Twitter,

    Qiita, SlideShare, Github →akatsuki174
  3. νʔϜͰͷ։ൃ ḿͬͯ·͔͢ʔʁʁ

  4. νʔϜ։ൃͬͯେมͰ͢ΑͶ

  5. ΈΜͳίʔυΛॻ͘ͱ͖ͷ Ϋη͸ҧ͍·͢ɻ

  6. A͞Μ B͞Μ

  7. ͋͋͋͋͋͋͋ʂʂʂ (ůʆ˚´)ů ᵢ:ŋ'∵:.ᵲᵲ:ŋ'.:∵

  8. ͦΜͳ͋ͳͨʹ࿕ใʂ

  9. ίʔυͷॻ͕ࣜҰఆͷϧʔϧ͔Β ֎Ε͍ͯͨ࣌ʹܯࠂɾΤϥʔΛ ग़ྗͯ͘͠ΔϥΠϒϥϦ͕͋Γ·͢ʂ

  10. ͦΕ͕ɺ SwiftLintʂ

  11. SwiftLintͱ͸ “A tool to enforce Swift style and conventions, loosely

    based on GitHub's Swift Style Guide.” https://github.com/realm/SwiftLintΑΓൈਮ →ίʔυ͕نଇʹଇͬͨ΋ͷʹ ɹͳ͍ͬͯΔ͔ΛνΣοΫͯ͘͠ΕΔπʔϧɻ
  12. SwiftLintͱ͸

  13. SwiftLintͱ͸

  14. SwiftLintͱ͸

  15. ಋೖྫ • HomebrewͰΠϯετʔϧ͢Δ • LintΛ࣮ߦ͢ΔϓϩδΣΫτʹRunScript Λॻ͘ • .swiftlint.ymlʹઃఆΛॻ͘ Ҏ্ʂʂʂ

  16. .swiftlint.ymlهड़ྫ

  17. ϧʔϧྫ঺հ

  18. todo TODO, FIXME͸ͳ͘͢ʂ

  19. valid_docs υΩϡϝϯτ͸ਖ਼͘͠ॻ͖·͠ΐ͏

  20. force_cast • ڧ੍cast͸μϝɺઈର

  21. force_try • ڧ੍try΋μϝɺઈର

  22. ΤϥʔϨϕϧͷΧελϚΠζ force_cast, force_tryΛ ΤϥʔͰ͸ͳ͘ܯࠂʹ͢Δ

  23. file_length 401ʙ1000ߦ ʹ ܯࠂ 1001ߦҎ্ ʹ ϏϧυΤϥʔ

  24. line_length 101ʙ200จࣈ ʹ ܯࠂ 201จࣈҎ্ ʹ ϏϧυΤϥʔ

  25. ਺஋ͷΧελϚΠζ ਺஋ௐ੔ɺΤϥʔϨϕϧௐ੔Մೳ

  26. control_statement • ৚݅ΛғΉʮ( )ʯ͸֎͠·͠ΐ͏

  27. ڧ͍ຯํɿautocorrect Ұ෦ͷϧʔϧ͸ $ swiftlint autocorrect Λ࣮ߦ͢ΔͱࣗಈͰमਖ਼ͯ͘͠ΕΔʂ ͨͩ͠όοΫΞοϓ͸औ͓͖ͬͯ·͠ΐ͏ʂ

  28. σϞ

  29. Ҏ্ɻ ͜ΕͰ͋ͳͨ΋޾ͤʹͳΕ·͢ɻ

  30. ͥͻSwiftLintΛ ಋೖͯ͠Έ͍ͯͩ͘͞ʂ

  31. SwiftLintͷࢿྉ • ެࣜ https://github.com/realm/SwiftLint • ؤுͬͯॻ͍ͨࢲͷQiitaͷهࣄ http://qiita.com/search? utf8=✓&sort=rel&q=user %3Aakatsuki174+swiftlint etc…

  32. ͝੩ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ