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

Vint - new Vim script lint

Kuniwak
November 08, 2014

Vint - new Vim script lint

I introduced the new lint for Vim script "vint"

Japanese ver: https://speakerdeck.com/orgachem/zhuan-banuxian-falsezhang-vint

Kuniwak

November 08, 2014
Tweet

More Decks by Kuniwak

Other Decks in Technology

Transcript

  1. Today,

    I talk about…

    View full-size slide

  2. 'PSFXBSOFEJT
    GPSFBSNFE
    ʲస͹͵ઌͷ伺ʳ

    View full-size slide

  3. Lint tool for Vim script

    View full-size slide

  4. 8IFO*XSPUF7JN1MVHJO
    NZTUFSJPVTCVHTPGUFO
    XFSFPDDVSSFEʜ

    View full-size slide

  5. #VU*EPOPUMPWF

    7JNTDSJQUʜ

    View full-size slide

  6. ʗ
    XFMDPNF
    ʘ
    ʘXFMDPNFʗ
    ʘXFMDPNFʗ

    View full-size slide

  7. *IPQFUPCVHT

    HFUQSFWFOUFE

    CFGPSFFYFDVUJPO

    View full-size slide

  8. 'PSFXBSOFEJT
    GPSFBSNFE

    View full-size slide

  9. Forewarned is forearmed

    View full-size slide

  10. $ vint .vimrc
    .vimrc:6:10: Variable is
    not declared (see :help
    E738)

    View full-size slide

  11. Lint possible story

    View full-size slide

  12. Stop the World Lint

    View full-size slide

  13. Nagging Mom Lint

    View full-size slide

  14. Meaning less Lint

    View full-size slide

  15. Fastness Customizable Usefulness
    Kuniwak/

    vint
    A A A
    syngan/

    vim-vimlint
    C B A
    ujihisa/

    vimlint
    B B B
    dahu/

    VimLint
    B C B
    dbakker/

    vim-lint
    A C B

    View full-size slide

  16. How to install

    View full-size slide

  17. $ pip install vim-vint

    View full-size slide

  18. $ vint .vimrc
    .vimrc:6:10: Variable is
    not declared (see :help
    E738)

    View full-size slide

  19. Dive into

    the Vint

    View full-size slide

  20. Maintainability

    View full-size slide

  21. .BKPSMJOUTXBTJNQMFNFOUFE
    CZUZQFT
    w $POUSPMqPXBOEMJOUJOHSVMF
    JOUFHSBUFEMJOU
    w $POUSPMqPXBOEMJOUJOHSVMF
    TFQBSBUFEMJOU

    View full-size slide

  22. Let’s compare the
    2 linting types by
    the index:

    View full-size slide

  23. “How many lines
    will you read to add
    a new linting rule”

    View full-size slide

  24. *OUFHSBUFEMJOU
    w KTMJOUpMFYMJOFT
    w KTIJOUpMFYMJOFT
    w WJNWJNMJOUpMFYMJOFT
    w QZqBLFTpMFYMJOFT

    View full-size slide

  25. 4FQBSBUFEMJOU
    w&WFOUESJWFOGPSMJOFT
    w QFQGVODUJPOTYMJOFT
    w WJNMJOUpMFTYMJOFT
    w&WFOUESJWFOGPS"45 IJHIMZGVODUJPOBM

    w 1FSM$SJUJDpMFTYMJOFT
    w SVCPDPQpMFTYMJOFT
    w FTMJOUpMFTYMJOFT
    w WJOUpMFTYMJOFT

    View full-size slide

  26. 5IFSFGPSFʜ
    w *OUFHSBUFEMJOUJTBCTPMVUFMZ

    OPUIVNBOSFBEBCMF
    w "45CBTFEFWFOUESJWFOMJOUDBO
    BOBMZ[FWBSJBCMFTDPQFT

    View full-size slide

  27. How to add
    new policy

    View full-size slide

  28. Please ask me

    View full-size slide

  29. Forewarned is forearmed
    https://github.com/Kuniwak/vint

    View full-size slide