difftodo-0.2.0: Generate todo lists from source code

Safe HaskellNone
LanguageHaskell2010

Fixme

Description

Routines for getting todos from source code

No backwards compatibility is promised for any code in this library.

Synopsis

Documentation

Get comments from code or from diffs

parseComments :: Filename -> Language -> ByteString -> [Comment] Source #

Given some source code, return a list of comments.

newCommentsFromDiff :: ByteString -> Either Text [Comment] Source #

Get the comments that were added or modified in a diff.

Silently ignores files if we can't figure out what their programming language is.

readComments :: FilePath -> Maybe (IO [Comment]) Source #

Read the given file, and parse out any comments.

Return Nothing if we cannot determine what language the file is in. Raises exceptions on bad IO, and also if the file cannot be decoded to Text.

Turn comments into todos

getTodos :: Comment -> [Todo] Source #

Format todos

formatTodo :: Todo -> Text Source #