🖥
Rails | How to Find Comments in Code (TODO, FIXME, OPTIMIZE, HACK, REV
$ rake notes
So, it will list annotation comments in the project.
Example:
app/models/example.rb: * [10] [TODO] モデルにカラムを追加するapp/models/example.rb: * [4] [FIXME] create が動かない
Display only specific annotations
For example
$ rake notes:custom ANNOTATION=FIXME
If you write, you will find only FIXME.
Find your own annotation
Because I'm just searching for a string. You can also find your own annotations.
# DANGER: 注意!
$ rake notes:custom ANNOTATION=DANGER
How to write annotations
+ Half space + Annotation + Half space + Body
Write in the form
Example:
# FIXME: ここを修正する
Supplement
- As it is Rails standard, installation of gem is not necessary.
- Note that I didn't hit even if I got it in "Find Rails FIXME".
Original by
Rails | コード内のコメントを見つける方法 (TODO、FIXME、OPTIMIZE、HACK、REVIEW)
About
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2019-04-16
Discussion