static analysis - Why does NDepend show CQL errors when run on the command line but not from the GUI? -
i've got bit of cql:
// <name>a stateless class or structure might turned static type</name> warnif count > 0 (from t in application.types t.sizeofinst ==0 && // accuracy, constraint doesn't take // account of types implement interfaces. // , classes have base class , don't // derive directly system.object, or classes // have sub-classes children. t.nbinterfacesimplemented == 0 && ((t.isclass && t.depthofinheritance == 1 && t.nbchildren == 0) || t.isstructure) && !t.isstatic && !t.derivefrom("system.attribute") && !t.isattributeclass && !t.isgeneric && t.name!="program" && !(t.isgeneratedbycompiler || t.hasattribute(@"ndepend.cql.ndependignoreattribute") || t.hasattribute("system.runtime.compilerservices.compilergeneratedattribute".allownomatch())) select new { t, t.sizeofinst, t.nbinterfacesimplemented, t.depthofinheritance, t.nbchildren }).take(10) // rule indicates stateless types might // turned static classes. // see definition of sizeofinst metric here // http://www.ndepend.com/metrics.aspx#sizeofinst it's fine in gui, message in output report when run command line:
1 query syntax error: not valid type name {"system.attribute"} any idea why?
it must come fact mscorlib, assembly contains system.attribute, not resolve @ analysis time. running gui , command line versions on same machine? @ assembly resolving go ndepend project properties > code analyze , see mscorlib resolved unfolding folder panel.
Comments
Post a Comment