Giter Club home page Giter Club logo

codefuse-query's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codefuse-query's Issues

关于数据质量

请问一下,如果用这个工具筛选高质量的代码数据,有什么比较好的思路吗?
目前项目内提供的例子比较少

运行python的圈复杂度计算结果为空

您好,我在linux上的一个简单的python程序上运行计算圈复杂度的代码的时候执行结果为空

【python代码】

a = 10

for i in range(10):
print("test")

【gdl文件】

// script
use coref::python::*

fn default_db() -> PythonDB {
return PythonDB::load("coref_python_src.db")
}

/**

  • Get cyclomatic complexity of functions
  • @param name function name
  • @param value cyclomatic complexity of function
  • @param path path of file including this function
  • @param sline function start line
  • @param eline function end line
    */
    fn getCyclomaticComplexity(
    name: string,
    value: int,
    path: string,
    sline: int,
    eline: int) -> bool {
    // get metric function
    for (c in MetricFunction(default_db())) {
    if (path = c.getLocation().getFile().getRelativePath() &&
    name = c.getQualifiedName() &&
    value = c.getCyclomaticComplexity() &&
    sline = c.getLocation().getStartLineNumber() &&
    eline = c.getLocation().getEndLineNumber()) {
    return true
    }
    }
    }

fn main() {
output(getCyclomaticComplexity())
}

【运行指令】
./sparrow-cli/sparrow database create -s test_java -lang java -o ./db_java/
./sparrow-cli/sparrow query run -d ./db_java/ -gdl test2.gdl -o ./

codefuse-query运行自定义Godel踩坑记录

脚本编译失败,报错:“line 1:9 mismatched input '::'expecting '('line 1:15 mismatchedinput1expecting {'operator', IDENTIFIER}input.line 3:18:extraneous'expecting')expecting {'{',"_"}line:3:21 mismatchedinput.">.....”。
需排查脚本文件头是否有“// script”注释,编译器的原因,等待后续修复。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.