TaskValidator.Core.TaskList (TaskValidator v0.9.5)

View Source

Represents a complete task list with all its tasks and metadata.

This aggregate encapsulates a collection of tasks along with validation metadata and reference definitions.

Summary

Functions

Finds a task by ID.

Gets all main tasks from the task list.

Creates a new task list.

Checks if a reference exists in the task list.

Gets statistics about the task list.

Gets all subtasks from the task list.

Gets the total number of tasks.

Checks if a task ID exists in the task list.

Gets all task IDs from the task list.

Gets tasks by category.

Gets tasks by status.

Types

t()

@type t() :: %TaskValidator.Core.TaskList{
  file_path: String.t() | nil,
  parsed_at: DateTime.t(),
  references: map(),
  tasks: [TaskValidator.Core.Task.t()],
  total_lines: non_neg_integer()
}

Functions

find_task(task_list, task_id)

@spec find_task(t(), String.t()) :: TaskValidator.Core.Task.t() | nil

Finds a task by ID.

main_tasks(task_list)

@spec main_tasks(t()) :: [TaskValidator.Core.Task.t()]

Gets all main tasks from the task list.

new(tasks, references, opts \\ [])

@spec new([TaskValidator.Core.Task.t()], map(), keyword()) :: t()

Creates a new task list.

reference_exists?(task_list, reference_name)

@spec reference_exists?(t(), String.t()) :: boolean()

Checks if a reference exists in the task list.

stats(task_list)

@spec stats(t()) :: map()

Gets statistics about the task list.

subtasks(task_list)

@spec subtasks(t()) :: [TaskValidator.Core.Task.t()]

Gets all subtasks from the task list.

task_count(task_list)

@spec task_count(t()) :: non_neg_integer()

Gets the total number of tasks.

task_exists?(task_list, task_id)

@spec task_exists?(t(), String.t()) :: boolean()

Checks if a task ID exists in the task list.

task_ids(task_list)

@spec task_ids(t()) :: [String.t()]

Gets all task IDs from the task list.

tasks_by_category(task_list, category)

@spec tasks_by_category(t(), atom()) :: [TaskValidator.Core.Task.t()]

Gets tasks by category.

tasks_by_status(task_list, status)

@spec tasks_by_status(t(), String.t()) :: [TaskValidator.Core.Task.t()]

Gets tasks by status.