-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: reviewdog 導入 #458
CI: reviewdog 導入 #458
Conversation
@@ -4,6 +4,8 @@ let s:save_cpo = &cpo | |||
set cpo&vim | |||
|
|||
function! s:_vital_loaded(V) abort | |||
let unused = 1 | |||
let dq = "double quote" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
将来的には私も vint 使いたいと思っているんですが、現状では vimlint を使っているので、vimlint にできないでしょうか? (Vim のインストールが必要なのでめんどいのはわかる) |
両方できるかテストしようとしてとりあえずvintにしてましたがvimlint実行できるようにしますー |
あと dockerfile どっかに置かないとだめなんで vim-jp に置くかしていただけますかね? (まだdockerfile 完成してないけど) というか vital.vim repo においてもいいのかな.うーむdocker力... |
@@ -4,6 +4,8 @@ let s:save_cpo = &cpo | |||
set cpo&vim | |||
|
|||
function! s:_vital_loaded(V) abort | |||
let unused = 1 | |||
let dq = "double quote" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vint] reported by reviewdog 🐶
Prefer single quoted strings (see Google VimScript Style Guide (Strings))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[補足] --name=vint 機能をreviewdogに追加したので新たにコメントがついてますが,本来は二重でコメントされることはありません
@@ -4,6 +4,8 @@ let s:save_cpo = &cpo | |||
set cpo&vim | |||
|
|||
function! s:_vital_loaded(V) abort | |||
let unused = 1 | |||
let dq = "double quote" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vimlint] reported by reviewdog 🐶
EVL102: unused variable l:dq
@@ -4,6 +4,8 @@ let s:save_cpo = &cpo | |||
set cpo&vim | |||
|
|||
function! s:_vital_loaded(V) abort | |||
let unused = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vimlint] reported by reviewdog 🐶
EVL102: unused variable l:unused
droneioは実行環境としてdocker image を使うのですがとりあえず haya14busa/dockerfile-lint-vital.vimにおいてみています. https://github.com/haya14busa/dockerfile-lint-vital.vim/blob/master/Dockerfile vim-jp リポジトリに移すか, vital.vim において自動でdockerhubにあげるようにtravisかcirle ci でCIすると良いかも知れない.ご意見募集です |
@@ -0,0 +1,15 @@ | |||
# Run the below command when you edit .drone.yml | |||
# drone secure --repo vim-jp/vital.vim --in .drone.sec.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
悪意あるp-rが yml ファイルを書き換えることによってGitHub の API token が漏らされることを防ぐため,コメントにあるコマンドを.drone.ymlファイルを変更するごとに実行する必要があります.
これを実行するにはもちろん API token を知っている (手元に .drone.sec.yaml) がある必要があり,現状僕とthincaさんが出来るようになっています.vital.vim メンテナの人には thinca さんとも相談の上権限を渡していくとよいかなと思っています
drone.io 参考doc とりあえずこんな感じかなというとこまでやったのでレビューよろしくお願いします. vint も現在実行してみちゃってるけど消してもよいという感じです. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨
全体的には OK です。Dockerfile の扱いどうしますかねー。 |
🎉 |
確かに完全に専用ではないんですよねー.ただ,vital.vim リポジトリで他のlintを走らせたくなったときは基本的にdrone.yml内で頑張ってtool用意するよりdockerfileで用意してしまうほうがいい感じなので悩ましい. vim/vint/vim-vimlint (/reviewdog) が入った docker image をbase にしたvital.vim用のimageがあるのが理想かもしれない...? まぁとはいえあとで考えるというのでよいのであればそれでお願いしたいかもです.現状他に入れたいlinterもないし. あとは現状 vim-vimlint も vint も両方実行しているので,場合によってはコメントが2つつくケースがあると思うので .vintrc.yaml あたりを導入して vim-vimlint でやっているやつはdisableするとよさそう. |
ひとまずマージしましたっ! |
マッジありがとうございます! 🎉 vimjp DockerHub べんりそう |
ref: #454