23 lines · yaml
1CustomChecks:2 - Name: test-diag-level3 Query: |4 match varDecl(5 hasType(asString("long")),6 hasTypeLoc(typeLoc().bind("long"))7 ).bind("decl")8 Diagnostic:9 - BindName: long10 Message: use 'int' instead of 'long'11 Level: Warning12 - BindName: decl13 Message: declaration of 'long'14 Level: Note15 - Name: test-let-bind16 Query: |17 let expr varDecl(isStaticStorageClass()).bind("vd")18 match expr19 Diagnostic:20 - BindName: vd21 Message: find static variable22 Level: Warning23