CodeQL library for Go
codeql/go-all 1.1.2-dev (changelog, source)
Search

Class ExtractedOrExternalFile

A file, including files that have not been extracted but are referred to as locations for errors.

Import path

import semmle.go.Files

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

constrainsIntBitSize

Holds if this file contains build constraints that ensure that it is only built on architectures of bit size bitSize, which can be 32 or 64.

explicitlyConstrainsIntBitSize

Holds if this file contains explicit build constraints that ensure that it is only built on an architecture of bit size bitSize, which can be 32 or 64.

getACommentGroup

Gets a child comment group.

getAPrimaryQlClass

Gets the name of a primary CodeQL class to which this node belongs.

getCommentGroup

Gets the ith child comment group.

getNumCommentGroups

Gets the number of child comment groups of this file.

getNumberOfLines

Gets the number of lines in this file.

getNumberOfLinesOfCode

Gets the number of lines containing code in this file.

getNumberOfLinesOfComments

Gets the number of lines containing comments in this file.

getPackageName

Gets the name of the package to which this file belongs.

getPackageNameExpr

Gets the package name as specified in the package clause of this file.

hasBuildConstraints

Holds if this file contains at least one build constraint.

implicitlyConstrainsIntBitSize

Holds if this file has a name which acts as an implicit build constraint that ensures that it is only built on an architecture of bit size bitSize, which can be 32 or 64.

toString

Inherited predicates

getAChild

Gets a child node of this node.

from AstNode
getAChildContainer

Gets a file or sub-folder in this container.

from Container
getAChildExpr

Gets an expression that is a child node of this node in the AST.

from ExprParent
getAChildGoModExpr

Gets an expression that is a child node of this node in the AST.

from GoModExprParent
getADecl

Gets a child declaration of this node in the AST.

from DeclParent
getAFile

Gets a file in this container.

from Container
getAFolder

Gets a sub-folder in this container.

from Container
getAbsolutePath

Gets the absolute, canonical path of this container, using forward slashes as path separator.

from Container
getBaseName

Gets the base name of this container including extension, that is, the last segment of its absolute path, or the empty string if it has no segments.

from Container
getChild

Gets the ith child node of this node.

from AstNode
getChildExpr

Gets the ith child expression of this node.

from ExprParent
getChildGoModExpr

Gets the ith child expression of this node.

from GoModExprParent
getDecl

Gets the ith child declaration of this node.

from DeclParent
getDocumentation

Gets the documentation comment group attached to this element, if any.

from Documentable
getEnclosingFunction

Gets the innermost function definition to which this AST node belongs, if any.

from AstNode
getExtension

Gets the extension of this container, that is, the suffix of its base name after the last dot character, if any.

from Container
getFile

Gets the file in this container that has the given baseName, if any.

from Container
getFile

Gets the file this program element comes from.

from Locatable
getFolder

Gets the sub-folder in this container that has the given baseName, if any.

from Container
getLocation

Gets this element’s location.

from Locatable
getNumChild

Gets the number of child nodes of this node.

from AstNode
getNumChildExpr

Gets the number of child expressions of this node.

from ExprParent
getNumChildGoModExpr

Gets the number of child expressions of this node.

from GoModExprParent
getNumDecl

Gets the number of child declarations of this node.

from DeclParent
getNumLines

Gets the number of lines covered by this element.

from Locatable
getParent

Gets the parent node of this AST node, if any.

from AstNode
getParentContainer

Gets the parent container of this file or folder, if any.

from Container
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from AstNode
getRelativePath

Gets the relative path of this file or folder from the root folder of the analyzed source location. The relative path of the root folder itself is the empty string.

from Container
getScope

Gets the scope induced by this node, if any.

from ScopeNode
getStem

Gets the stem of this container, that is, the prefix of its base name up to (but not including) the last dot character if there is one, or the entire base name if there is not.

from Container
getURL

Gets the URL of this file.

from File
getUniquelyNumberedChild

Get an AstNode child, ordered by child kind and then by index.

from AstNode
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Locatable