aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorrobertomiranda <rjmaltamar@gmail.com>2014-03-17 10:31:21 -0500
committerrobertomiranda <rjmaltamar@gmail.com>2014-03-17 17:03:41 -0500
commit6b4793b1d2793e37a3cd314ab84edf5ccc2a2032 (patch)
treefbe744fd1eeeeacdcd5931eca0a60d811417f70b /guides
parent8eac0a6b5817defabef6cee2f12baeda26e91d8f (diff)
downloadrails-6b4793b1d2793e37a3cd314ab84edf5ccc2a2032.tar.gz
rails-6b4793b1d2793e37a3cd314ab84edf5ccc2a2032.tar.bz2
rails-6b4793b1d2793e37a3cd314ab84edf5ccc2a2032.zip
Update command line guide
Diffstat (limited to 'guides')
-rw-r--r--guides/source/command_line.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/guides/source/command_line.md b/guides/source/command_line.md
index 8949ef4c78..57283f7c40 100644
--- a/guides/source/command_line.md
+++ b/guides/source/command_line.md
@@ -411,7 +411,7 @@ The `doc:` namespace has the tools to generate documentation for your app, API d
### `notes`
-`rake notes` will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is done in files with extension `.builder`, `.rb`, `.erb`, `.haml`, `.slim`, `.css`, `.scss`, `.js`, `.coffee`, `.rake`, `.sass` and `.less` for both default and custom annotations.
+`rake notes` will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is done in files with extension `.builder`, `.rb`, `.rake`, `.yml`, `.yaml`, `.ruby`, `.css`, `.js` and `.erb` for both default and custom annotations.
```bash
$ rake notes
@@ -425,6 +425,12 @@ app/models/school.rb:
* [ 17] [FIXME]
```
+You can add support for new file extensions using `config.annotations.register_extensions` option, which receives a list of the extensions with its corresponding regex to match it up.
+
+```ruby
+config.annotations.register_extensions("scss", "sass", "less") { |annotation| /\/\/\s*(#{annotation}):?\s*(.*)$/ }
+```
+
If you are looking for a specific annotation, say FIXME, you can use `rake notes:fixme`. Note that you have to lower case the annotation's name.
```bash