Browse Source

Adding filetypes

Added explicit instructions on how to add filetypes
pull/1072/head
Johannes Schöpp 3 years ago
committed by GitHub
parent
commit
fe36783d5e
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      CONTRIBUTING.md

+ 10
- 0
CONTRIBUTING.md View File

@ -14,3 +14,13 @@ The test suite uses [Cram](https://bitheap.org/cram/). You'll need to build ag
first, and then you can run the suite from the root of the repository :
make test
### Adding filetypes
Ag can search files which belong to a certain class for example `ag --html test`
searches all files with the extension defined in [lang.c](src/lang.c).
If you want to add a new file 'class' to ag please modify [lang.c](src/lang.c) and [list_file_types.t](tests/list_file_types.t).
`lang.c` adds the functionality and `list_file_types.t` adds the test case.
Without adding a test case the test __will__ fail.

Loading…
Cancel
Save