codeql icon indicating copy to clipboard operation
codeql copied to clipboard

General issue

Open Cheap-Cheer opened this issue 1 year ago • 5 comments
trafficstars

How can I download standard libraries locally? Preferably stored as some sort of structured data, please!

Cheap-Cheer avatar Jan 21 '24 22:01 Cheap-Cheer

Just like this https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/frameworks/javaee/Persistence.qll/type.Persistence$AccessAnnotation.html

Cheap-Cheer avatar Jan 21 '24 22:01 Cheap-Cheer

How can I download standard libraries locally? Preferably stored as some sort of structured data, please!

You can get a local copy of the standard libraries by cloning the https://github.com/github/codeql repository.

Just like this https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/frameworks/javaee/Persistence.qll/type.Persistence$AccessAnnotation.html

This online documentation of the standard libraries is generated from the repository that I mention above.

ginsbach avatar Jan 22 '24 16:01 ginsbach

How can I download standard libraries locally? Preferably stored as some sort of structured data, please!

You can get a local copy of the standard libraries by cloning the https://github.com/github/codeql repository.

Just like this https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/frameworks/javaee/Persistence.qll/type.Persistence$AccessAnnotation.html

This online documentation of the standard libraries is generated from the repository that I mention above.

Thank you! But the codeql/docs/ql-libraries/ directory only has one folder dataflow and one file in it, where do I need to find the rest?

Cheap-Cheer avatar Feb 28 '24 07:02 Cheap-Cheer

Thank you! But the codeql/docs/ql-libraries/ directory only has one folder dataflow and one file in it, where do I need to find the rest?

The codeql repository contains all the standard libraries. What you are looking for seems to be the documentation for the standard libraries rather than the libraries themselves. That documentation is automatically generated from the .ql and .qll source files in the codeql repository that I linked to.

For example, this documentation file that you linked to to is automatically generated from the declaration of the AccessAnnotation class in the codeql repository:

/**
 * A `@javax.persistence.Access` annotation.
 */
class AccessAnnotation extends Annotation {
  AccessAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Access") }
}

ginsbach avatar Feb 28 '24 17:02 ginsbach

Thank you!

Cheap-Cheer avatar Mar 02 '24 08:03 Cheap-Cheer