27

I'm looking for examples of .feature files written with the Gherkin syntax.

I tried this query:

https://github.com/search?utf8=%E2%9C%93&q=extension%3Afeature&ref=simplesearch

But there are no results.

1

2 Answers 2

38

Just enter

path:*.feature

into the search bar.

2
  • I am left wondering why it does not work in the github api but does work in the github search bar.
    – Berni
    Commented Mar 12 at 17:58
  • Can't get this to work in GitHub Enterprise. What works there is extension:*feature. Also, it's worth mentioning that the answer by @GoodDeeds also has some aspects that needs to be taken into account. Commented May 21 at 13:35
9

According to GitHub's help page on Searching Code, under Considerations for code search, it is mentioned that:

Except with filename searches, you must always include at least one search term when searching source code. For example, searching for language:javascript is not valid, while amazing language:javascript is.

So, just searching for extension:feature will not work. You need to use at least one search term. For example, Feature extension:feature, where Feature is a search term.

You can also search by language, by using, for example, Feature language:Gherkin.

Not the answer you're looking for? Browse other questions tagged or ask your own question.