mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
498ad63f63
commit
6abd961ae8
|
@ -9,6 +9,17 @@ fixme-prefix TODO:
|
||||||
|
|
||||||
fixme-git-scan-filter-days 30
|
fixme-git-scan-filter-days 30
|
||||||
|
|
||||||
|
fixme-attribs assigned workflow
|
||||||
|
|
||||||
|
fixme-attribs resolution cat scope
|
||||||
|
|
||||||
|
fixme-value-set workflow new backlog wip test fixed done
|
||||||
|
|
||||||
|
fixme-value-set cat bug feat refactor
|
||||||
|
|
||||||
|
fixme-value-set scope mvp-0 mvp-1 backlog
|
||||||
|
|
||||||
|
|
||||||
fixme-files **/*.txt docs/devlog.md
|
fixme-files **/*.txt docs/devlog.md
|
||||||
fixme-files **/*.hs
|
fixme-files **/*.hs
|
||||||
|
|
||||||
|
|
|
@ -414,6 +414,9 @@ printEnv = do
|
||||||
<&> HM.toList
|
<&> HM.toList
|
||||||
<&> fmap (over _2 HS.toList)
|
<&> fmap (over _2 HS.toList)
|
||||||
|
|
||||||
|
attr <- asks fixmeEnvAttribs >>= readTVarIO <&> HS.toList
|
||||||
|
vals <- asks fixmeEnvAttribValues >>= readTVarIO <&> HM.toList
|
||||||
|
|
||||||
for_ tags $ \m -> do
|
for_ tags $ \m -> do
|
||||||
liftIO $ print $ "fixme-prefix" <+> pretty m
|
liftIO $ print $ "fixme-prefix" <+> pretty m
|
||||||
|
|
||||||
|
@ -431,6 +434,12 @@ printEnv = do
|
||||||
liftIO $ print $ "fixme-file-comments"
|
liftIO $ print $ "fixme-file-comments"
|
||||||
<+> dquotes (pretty ft) <+> dquotes (pretty comm)
|
<+> dquotes (pretty ft) <+> dquotes (pretty comm)
|
||||||
|
|
||||||
|
for_ attr $ \a -> do
|
||||||
|
liftIO $ print $ "fixme-attribs"
|
||||||
|
<+> pretty a
|
||||||
|
|
||||||
|
for_ vals$ \(v, vs) -> do
|
||||||
|
liftIO $ print $ "fixme-value-set" <+> pretty v <+> hsep (fmap pretty (HS.toList vs))
|
||||||
|
|
||||||
help :: FixmePerks m => m ()
|
help :: FixmePerks m => m ()
|
||||||
help = do
|
help = do
|
||||||
|
@ -484,6 +493,16 @@ run what = do
|
||||||
let co = fmap Text.pack xs & HS.fromList
|
let co = fmap Text.pack xs & HS.fromList
|
||||||
atomically $ modifyTVar t (<> co)
|
atomically $ modifyTVar t (<> co)
|
||||||
|
|
||||||
|
ListVal (SymbolVal "fixme-attribs" : StringLikeList xs) -> do
|
||||||
|
ta <- asks fixmeEnvAttribs
|
||||||
|
atomically $ modifyTVar ta (<> HS.fromList (fmap fromString xs))
|
||||||
|
|
||||||
|
ListVal (SymbolVal "fixme-value-set" : StringLike n : StringLikeList xs) -> do
|
||||||
|
t <- asks fixmeEnvAttribValues
|
||||||
|
let name = fromString n
|
||||||
|
let vals = fmap fromString xs & HS.fromList
|
||||||
|
atomically $ modifyTVar t (HM.insertWith (<>) name vals)
|
||||||
|
|
||||||
Init -> init
|
Init -> init
|
||||||
|
|
||||||
ScanGitLocal args -> scanGitLocal args Nothing
|
ScanGitLocal args -> scanGitLocal args Nothing
|
||||||
|
|
|
@ -46,7 +46,7 @@ newtype FixmeAttrName = FixmeAttrName { fromFixmeAttrName :: Text }
|
||||||
|
|
||||||
|
|
||||||
newtype FixmeAttrVal = FixmeAttrVal { fromFixmeAttrVal :: Text }
|
newtype FixmeAttrVal = FixmeAttrVal { fromFixmeAttrVal :: Text }
|
||||||
deriving newtype (Eq,Ord,Show,IsString,ToField,FromField)
|
deriving newtype (Eq,Ord,Show,IsString,Hashable,ToField,FromField)
|
||||||
deriving stock (Data,Generic)
|
deriving stock (Data,Generic)
|
||||||
|
|
||||||
newtype FixmeTimestamp = FixmeTimestamp Word64
|
newtype FixmeTimestamp = FixmeTimestamp Word64
|
||||||
|
@ -83,6 +83,8 @@ data FixmeEnv =
|
||||||
{ fixmeEnvGitDir :: Maybe FilePath
|
{ fixmeEnvGitDir :: Maybe FilePath
|
||||||
, fixmeEnvFileMask :: TVar [FilePattern]
|
, fixmeEnvFileMask :: TVar [FilePattern]
|
||||||
, fixmeEnvTags :: TVar (HashSet FixmeTag)
|
, fixmeEnvTags :: TVar (HashSet FixmeTag)
|
||||||
|
, fixmeEnvAttribs :: TVar (HashSet FixmeAttrName)
|
||||||
|
, fixmeEnvAttribValues :: TVar (HashMap FixmeAttrName (HashSet FixmeAttrVal))
|
||||||
, fixmeEnvDefComments :: TVar (HashSet Text)
|
, fixmeEnvDefComments :: TVar (HashSet Text)
|
||||||
, fixmeEnvFileComments :: TVar (HashMap FilePath (HashSet Text))
|
, fixmeEnvFileComments :: TVar (HashMap FilePath (HashSet Text))
|
||||||
, fixmeEnvGitScanDays :: TVar (Maybe Integer)
|
, fixmeEnvGitScanDays :: TVar (Maybe Integer)
|
||||||
|
@ -130,6 +132,8 @@ runFixmeCLI m = do
|
||||||
<$> newTVarIO mempty
|
<$> newTVarIO mempty
|
||||||
<*> newTVarIO mempty
|
<*> newTVarIO mempty
|
||||||
<*> newTVarIO mempty
|
<*> newTVarIO mempty
|
||||||
|
<*> newTVarIO mempty
|
||||||
|
<*> newTVarIO mempty
|
||||||
<*> newTVarIO defCommentMap
|
<*> newTVarIO defCommentMap
|
||||||
<*> newTVarIO Nothing
|
<*> newTVarIO Nothing
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue