mirror of https://gitlab.com/basile.b/dexed.git
updated cetodo for compat with the widget
This commit is contained in:
parent
425ed05f11
commit
cbec3babe3
|
|
@ -5,7 +5,7 @@ object CurrentProject: TCEProject
|
||||||
messagesOptions.additionalWarnings = True
|
messagesOptions.additionalWarnings = True
|
||||||
outputOptions.boundsCheck = onAlways
|
outputOptions.boundsCheck = onAlways
|
||||||
outputOptions.unittest = True
|
outputOptions.unittest = True
|
||||||
pathsOptions.outputFilename = '..\cetodo.exe'
|
pathsOptions.outputFilename = '..\lazproj\cetodo.exe'
|
||||||
preBuildProcess.options = []
|
preBuildProcess.options = []
|
||||||
preBuildProcess.showWindow = swoNone
|
preBuildProcess.showWindow = swoNone
|
||||||
postBuildProcess.options = []
|
postBuildProcess.options = []
|
||||||
|
|
@ -13,7 +13,6 @@ object CurrentProject: TCEProject
|
||||||
runOptions.options = [poUsePipes, poStderrToOutPut]
|
runOptions.options = [poUsePipes, poStderrToOutPut]
|
||||||
runOptions.parameters.Strings = (
|
runOptions.parameters.Strings = (
|
||||||
'<CPFS>'
|
'<CPFS>'
|
||||||
'<CFF>'
|
|
||||||
)
|
)
|
||||||
runOptions.showWindow = swoHIDE
|
runOptions.showWindow = swoHIDE
|
||||||
end
|
end
|
||||||
|
|
@ -23,7 +22,7 @@ object CurrentProject: TCEProject
|
||||||
outputOptions.boundsCheck = offAlways
|
outputOptions.boundsCheck = offAlways
|
||||||
outputOptions.optimizations = True
|
outputOptions.optimizations = True
|
||||||
outputOptions.release = True
|
outputOptions.release = True
|
||||||
pathsOptions.outputFilename = '..\cetodo.exe'
|
pathsOptions.outputFilename = '..\lazproj\cetodo.exe'
|
||||||
preBuildProcess.options = []
|
preBuildProcess.options = []
|
||||||
preBuildProcess.showWindow = swoNone
|
preBuildProcess.showWindow = swoNone
|
||||||
postBuildProcess.options = []
|
postBuildProcess.options = []
|
||||||
|
|
@ -34,7 +33,7 @@ object CurrentProject: TCEProject
|
||||||
Sources.Strings = (
|
Sources.Strings = (
|
||||||
'cetodo.d'
|
'cetodo.d'
|
||||||
)
|
)
|
||||||
ConfigurationIndex = 0
|
ConfigurationIndex = 1
|
||||||
LibraryAliases.Strings = (
|
LibraryAliases.Strings = (
|
||||||
'libdparse'
|
'libdparse'
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
TODO source code analyzer for Coedit projects/files
|
TODO source code analyzer for Coedit projects/files
|
||||||
|
|
||||||
Format: // TODO [fields] : content
|
Format: // TODO [fields] : text
|
||||||
|
|
||||||
- TODO: used to detect that the comment is a "TODO" comment. The keyword is not
|
- TODO: used to detect that the comment is a "TODO" comment. The keyword is not
|
||||||
case sensitive.
|
case sensitive.
|
||||||
|
|
@ -14,7 +14,7 @@ possible fields include:
|
||||||
- p: TODO priority, eg: -p8 -p0
|
- p: TODO priority, eg: -p8 -p0
|
||||||
- s: TODO status, e.g -sPartiallyFixed, -sDone
|
- s: TODO status, e.g -sPartiallyFixed, -sDone
|
||||||
|
|
||||||
- content: the literal message, e.g: "set this property as const() to set it read only".
|
- text: the literal message, e.g: "set this property as const() to set it read only".
|
||||||
|
|
||||||
full examples:
|
full examples:
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ import std.d.ast, std.d.lexer, std.d.parser;
|
||||||
|
|
||||||
private struct TodoItem
|
private struct TodoItem
|
||||||
{
|
{
|
||||||
private enum TodoField {file, line, text, category, assignee, priority, status}
|
private enum TodoField {filename, line, text, category, assignee, priority, status}
|
||||||
private string[TodoField] fFields;
|
private string[TodoField] fFields;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,7 +49,7 @@ private struct TodoItem
|
||||||
* Params:
|
* Params:
|
||||||
* fname = the file where the item is located. mandatory.
|
* fname = the file where the item is located. mandatory.
|
||||||
* line = the line where the item is located. mandatory.
|
* line = the line where the item is located. mandatory.
|
||||||
* text = the TODO content. mandatory.
|
* text = the TODO text. mandatory.
|
||||||
*/
|
*/
|
||||||
@safe public this(string fname, string line, string text, string cat = "", string ass = "", string prior = "", string status = "")
|
@safe public this(string fname, string line, string text, string cat = "", string ass = "", string prior = "", string status = "")
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +62,7 @@ private struct TodoItem
|
||||||
if (prior.length) try auto i = to!long(prior);
|
if (prior.length) try auto i = to!long(prior);
|
||||||
catch(Exception e) prior = "";
|
catch(Exception e) prior = "";
|
||||||
|
|
||||||
fFields[TodoField.file] = fname;
|
fFields[TodoField.filename] = fname;
|
||||||
fFields[TodoField.line] = line;
|
fFields[TodoField.line] = line;
|
||||||
fFields[TodoField.text] = text;
|
fFields[TodoField.text] = text;
|
||||||
fFields[TodoField.category] = cat;
|
fFields[TodoField.category] = cat;
|
||||||
|
|
@ -78,11 +78,11 @@ private struct TodoItem
|
||||||
*/
|
*/
|
||||||
@safe public void serialize(ref string LfmString)
|
@safe public void serialize(ref string LfmString)
|
||||||
{
|
{
|
||||||
LfmString ~= "\t\titem\n";
|
LfmString ~= " item\n";
|
||||||
foreach(member; EnumMembers!TodoField)
|
foreach(member; EnumMembers!TodoField)
|
||||||
if (fFields[member].length)
|
if (fFields[member].length)
|
||||||
LfmString ~= format("\t\t\t%s = '%s'\n", to!string(member), fFields[member]);
|
LfmString ~= format(" %s = '%s'\n", to!string(member), fFields[member]);
|
||||||
LfmString ~= "\t\tend\n";
|
LfmString ~= " end\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,7 +117,7 @@ void main(string[] args)
|
||||||
// serialize the items using the pascal component streaming text format
|
// serialize the items using the pascal component streaming text format
|
||||||
foreach(todoItem; todoItems) todoItem.serialize(LfmString);
|
foreach(todoItem; todoItems) todoItem.serialize(LfmString);
|
||||||
// the widget has the TODOs in the output
|
// the widget has the TODOs in the output
|
||||||
if (LfmString.length) writefln("object TTodoItems\n\titems = <\n%s>\nend", LfmString);
|
if (LfmString.length) writefln("object TTodoItems\n items = <\n%s>\nend", LfmString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Try to transforms a Token into a a TODO item
|
/// Try to transforms a Token into a a TODO item
|
||||||
|
|
@ -147,7 +147,7 @@ void main(string[] args)
|
||||||
}
|
}
|
||||||
if (!isTodoComment) return;
|
if (!isTodoComment) return;
|
||||||
|
|
||||||
//fields : content
|
//fields : text
|
||||||
identifier = identifier.init;
|
identifier = identifier.init;
|
||||||
auto fc = text.split(':');
|
auto fc = text.split(':');
|
||||||
if (fc.length < 2) return;
|
if (fc.length < 2) return;
|
||||||
|
|
@ -187,6 +187,6 @@ void main(string[] args)
|
||||||
|
|
||||||
// TODO-cINVALID_because_no_content:
|
// TODO-cINVALID_because_no_content:
|
||||||
// TODO: set this property as const() to set it read only.
|
// TODO: set this property as const() to set it read only.
|
||||||
// TODO-cfeature: save this property in the inifile.
|
// TODO-cfeature-sDone: save this property in the inifile.
|
||||||
// TODO-cannnotations-p8: annotates the member of the module as @safe and if possible nothrow.
|
// TODO-cannnotations-p8: annotates the member of the module as @safe and if possible nothrow.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue