在氧气任务中显示警告



我正在使用ant- oxygen为一个java项目创建文档,它工作得很好。不幸的是,ant任务不会回显氧的警告,尽管它们在氧配置文件中是启用的。

我希望在某些类/方法没有任何文档注释的情况下得到警告。

以下面的java类为例…

类Foo

package com.example;
/**
 *
 * The class Foo is a test class
 */
public class Foo
{
    /**
     * The test method
     * @param args
     */
    public static void main(String[] args)
    {
    }
    public static void undocumentedMethod()
    {
    }
}

正如你所看到的,静态方法" undocumtedmethod "没有任何Javadoc注释。当创建文档时,我想要被告知这一点。

氧配置文件:

Doxyfile

DOXYFILE_ENCODING      = UTF-8
PROJECT_NAME           = "DoxyTest"
OUTPUT_DIRECTORY       = "docs"
OUTPUT_LANGUAGE        = English
RECURSIVE              = YES
WARNINGS               = YES
WARN_IF_UNDOCUMENTED   = YES
WARN_IF_DOC_ERROR      = YES
WARN_NO_PARAMDOC       = NO
GENERATE_LATEX         = NO

这是ant脚本…

build . xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:doxygen="antlib:org.doxygen.tools" basedir="." default="test" name="DoxyTest">
    <target name="test" description="test target">
        <doxygen:doxygen configFilename="Doxyfile"/>
    </target>   
</project>

这就是结果,当我运行ant-script =>时,没有警告

运行ant脚本的结果

D:wsDoxyTest01>ant
Buildfile: D:wsDoxyTest01build.xml
test:
[doxygen:doxygen] Exec: doxygen Doxyfile
BUILD SUCCESSFUL
Total time: 0 seconds

这里是结果,当我直接运行氧=>警告(和许多其他信息)显示

直接加氧结果

D:wsDoxyTest01>doxygen Doxyfile
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Searching for files in directory D:/ws/DoxyTest01
Searching for files in directory D:/ws/DoxyTest01/bin
Searching for files in directory D:/ws/DoxyTest01/bin/com
Searching for files in directory D:/ws/DoxyTest01/bin/com/example
Searching for files in directory D:/ws/DoxyTest01/docs
Searching for files in directory D:/ws/DoxyTest01/src
Searching for files in directory D:/ws/DoxyTest01/src/com
Searching for files in directory D:/ws/DoxyTest01/src/com/example
Reading and parsing tag files
Parsing files
Reading D:/ws/DoxyTest01/src/com/example/Foo.java...
Parsing file D:/ws/DoxyTest01/src/com/example/Foo.java...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Creating members for template instances...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Computing dependencies between directories...
Generating citations page...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating page documentation...
Generating group documentation...
Generating class documentation...
Generating namespace index...
Generating docs for compound com::example::Foo...
D:/ws/DoxyTest01/src/com/example/Foo.java:7: warning: Member undocumentedMethod() (function) of class com::example::Foo is not documented.
Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating module index...
Generating namespace index...
Generating namespace member index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
lookup cache used 2/65536 hits=2 misses=2
finished...

有没有人知道是否有可能告诉蚂蚁任务打印命令行工具打印的所有东西?

尝试将verbose属性设置为true:

<doxygen:doxygen configFilename="Doxyfile" verbose="true"/>

有关其他使用示例,请参阅github ant- oxygen
——编辑——
也许EXTRACT_ALL被设置为YES ?从氧站点:

构建相关配置选项

EXTRACT_ALL

如果EXTRACT_ALL标签设置为YES,则氧气将承担所有实体在文档中记录,即使没有文档可用。私有类成员和静态文件成员将是隐藏,除非EXTRACT_PRIVATE分别为EXTRACT_STATIC标签设置为YES。这也将禁用关于的警告。未记录的成员,通常在设置WARNINGS时产生是的。

相关内容

  • 没有找到相关文章