From 7c4995d1508efc17791995c546fac8ea3039bc1b Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Sun, 15 Oct 2023 10:45:22 +0200 Subject: add some issues --- app/Main.hs | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) diff --git a/app/Main.hs b/app/Main.hs index d75ef9c..45aaa22 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -72,6 +72,174 @@ -- edited -- ``` +-- TODO Add options to show command to display source code around the issue +-- +-- The `show` command should have the command line arguments +-- `--after/-A`, `--before/-B` and `--context/-C` which take an integer +-- n and change the output to contain n lines after, before or around +-- the issue. +-- +-- @topic show +-- @topic options + +-- TODO Expose all command line options as environment variables +-- +-- It should be possible to provide a default for any command line +-- argument via an environment variable. The name of the variable +-- should be all upper case and prefixed with `ANISSUE_`, e.g. the +-- default value for the command line option `--internal-tags` should be +-- settable via `ANISSUE_INTERNAL_TAGS`. +-- +-- @topic options +-- @topic settings + +-- TODO Add a subcommand which appends the generated ids to the issue in the sourcecode +-- +-- Given the following issue +-- +-- ``` +-- # TODO Some title +-- # +-- # Some description +-- ``` +-- +-- After running `anissue lint`, the issue will be changed to +-- +-- ``` +-- # TODO Some title +-- # +-- # Some description +-- # +-- # @id some-title +-- ``` +-- +-- @topic ids + +-- FIXME Exclude tags in code blocks +-- +-- Tags which appear in markdown code blocks should not be considered +-- tags. +-- +-- @topic tags + +-- TODO Only separate generated tags with a blank line when description does not end with tags +-- +-- An issue like +-- +-- ``` +-- # TODO Some title +-- # +-- # @id some-title +-- ``` +-- +-- Should be rendered as +-- +-- ``` +-- # TODO Some title +-- +-- @id some-title +-- @file the-file.sh +-- @row 42 +-- ``` +-- +-- @topic tags + +-- QUESTION Should automatically generated ids be random? +-- +-- Right now default id of an issue is the slugification of it's title. +-- Once we have a command to automatically append this id to the issue +-- within the source code, users might feel tempted to change the id +-- after they have adjusted the title. This then would break the +-- provenance of the issue. If the generated id was something like +-- `tooth-cherry-switch`, it would be just a random string and noone +-- would feel the need to change it. +-- +-- I imagine a workflow where I add issues in the source code. And +-- before commiting, I run `anissue lint` to generate ids for all new +-- issues. +-- +-- @topic ids + +-- TODO Dependencies between issues +-- +-- The user should be able to specify that an issue is blocked by +-- a different issue by adding `@blocker id-of-blocking-issue`. +-- +-- When running `anissue list --show-dependencies`, the output should +-- render a list of trees deduced from these blocker-relations. E.g. +-- +-- ``` +-- Issue A +-- ├ Issue A1 (blocked by A) +-- │ ├ Issue A11 (blocked by A1) +-- ├─┴ Issue A3A11 (blocked by A and A1) +-- └ Issue A2B1 (blocked by A and B) +-- Issue B +-- └ Issue A2B1 (blocked by A and B) +-- Issue C +-- ``` +-- +-- The items should be ordered with the most blocking issues at the top. +-- +-- @topic dependencies + +-- FIXME Render all unicode symbols correctly +-- +-- Some symbols like e.g. `╬` are not rendered properly. + +-- TODO Add fulltext search +-- +-- Additional to `--filter` it should be possible to search for issues +-- using `--search 'some query'` using a search-engine like full text +-- search. +-- +-- To make this fast, we could use a package like +-- and make sure +-- to persist the index in a local cache. +-- +-- @topic search + +-- TODO Display issue type in list and show views +-- +-- Depending on the type of issue (TODO, FIXME, ...) there should be +-- either a prefix in the list view (e.g. 🏗️, 🐞, ...), or the list +-- should be grouped by the type. + +-- TODO Add option to group issue list +-- +-- When running `anissue list` with the `--group-by` option, the output +-- will be grouped. E.g. running `anissue list --group-by topic` would +-- produce +-- +-- ``` +-- Issue D +-- Issue E +-- +-- @topic tags +-- Issue A +-- Issue B @topic ids +-- +-- @topic ids +-- Issue B @topic tags +-- Issue C +-- ``` +-- +-- Other possible grouping options could be +-- +-- type +-- : the issue type, i.e. `TODO`, `FIXME`, `QUESTION`, etc. +-- +-- priority +-- : the priority, groups should be sorted with the highest priority +-- first +-- +-- @topic options + +-- FIXME anissue crashes when displaying unicode emojis +-- +-- Running `anissue show tool-crashes-when-displaying-unicode-emojis` +-- will crash because of 🏗️. + module Main where import Data.List (find) -- cgit v1.2.3