Credo v1.4.0 Credo.SourceFile View Source
SourceFile structs represent a source file in the codebase.
Link to this section Summary
Functions
Returns the AST for the given source_file.
Returns the column of the given trigger inside the given line.
Returns the line at the given line_no.
Returns the snippet at the given line_no between column1 and column2.
Returns the lines of source code for the given source_file.
Returns a SourceFile struct for the given source code and filename.
Returns the source code for the given source_file.
Returns the source code and filename for the given source_file_or_source.
Link to this section Types
t()
View Sourcet() :: %Credo.SourceFile{
filename: nil | String.t(),
status: :valid | :invalid | :timed_out
}
Link to this section Functions
Returns the AST for the given source_file.
Returns the column of the given trigger inside the given line.
NOTE: Both line_no and the returned index are 1-based.
Returns the line at the given line_no.
NOTE: line_no is a 1-based index.
Returns the snippet at the given line_no between column1 and column2.
NOTE: line_no is a 1-based index.
Returns the lines of source code for the given source_file.
Returns a SourceFile struct for the given source code and filename.
Returns the source code for the given source_file.
source_and_filename(source_file_or_source, default_filename \\ "nofilename")
View SourceReturns the source code and filename for the given source_file_or_source.