Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoring: test against local scip-ctags #677

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

jtibshirani
Copy link
Member

This change refactors our end-to-end scoring tests and enables local testing
using the scip-ctags binary:

  • Split scoring tests out of e2e_test and into their own file scoring_test
  • Split huge test methods into targeted ones like TestFileNameMatch,
    TestJava, TestGo, etc.
  • For languages that scip-ctags supports, rerun the same cases using the
    scip-ctags binary

To run scip-ctags tests locally, you can set the env variable

SCIP_CTAGS_COMMAND=<sourcegraph-repo>/dev/scip-ctags-dev

This doesn't yet update Zoekt CI to run scip-ctags tests. That will be tackled
in a follow-up.

@@ -835,7 +835,7 @@ func scoreSymbolKind(language string, filename []byte, sym []byte, kind ctags.Sy
switch kind {
case ctags.Class: // classes
factor = 10
case ctags.Function: // function definitions
case ctags.Function, ctags.Method: // function definitions
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling these tests caught a bug in our Python logic: universal-ctags always emits function, but scip-ctags distinguishes between function and method.

@jtibshirani jtibshirani merged commit c7e066e into main Nov 1, 2023
8 checks passed
@jtibshirani jtibshirani deleted the jtibs/scip-ctags branch November 1, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants