boyter / searchcode-server

The offical home of searchcode-server where you can run searchcode locally. Note that master is generally unstable in the sense that it is not a release. Check releases for release versions https://github.com/boyter/searchcode-server/releases

Home Page:https://searchcodeserver.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Requestion: Add some additional extensions logic

NathanaelA opened this issue · comments

Typescript by default uses .ts as its extension. It also has .d.ts to stand for typings. I would like to categorize the .d.ts files as "Typings" and leave the .ts and Typescript. However, even though I attempted to add a d.ts file to the list both before and after the ts in the list; all the .d.ts files were cataloged as typescript files.

I would like to be able to have the matching algorithm be smart enough to know that a .d.ts is different than a .ts file.

Not a problem. I need to make a few modifications to the way the classification works to get this going but not a huge issue.

Awesome, this one actually is a annoying pain. I search for something and get the .d.ts in the search results, and can't eliminate them by picking .ts since they are classified as .ts. But I need them indexed because people will want to search just the typings too... Looking forward to when this gets fixed. Thanks!

Yep Its mostly there. I just need to add the logic to pick which one is correct when both match. Going to make it go for the longest one IE the best fitting match. Then will merge.

I will add it to the classifier database as well for you,

{
    "language": "Typings Definition",
    "extensions": [
      "d.ts"
    ],
    "keywords": []
  }

Sitting in master. Added a variety of new tests for it and verified against a sample repository.

screen shot 2017-09-15 at 5 46 08 pm