Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-47

Check headers for missing declarations and Effective C++ violations

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.7
    • 0.10.0
    • Build
    • None

    Description

      The resolution adds a "header-check" task to build.xml to generate mock C++ files to check that headers explicitly include all dependencies and are in conformance with GCC's =Weffc++ option which checks the source code against rules from Scott Meyer's "Effective C++" books.

      To use, both ant-contrib.jar and cpptasks.jar for the Ant-contrib project must be on the classpath.

      ant header-check

      Will copy all header files from include to build/header-check, will then generate .cpp files which look like:

      #include "/home/whoever/logging-log4cxx/include/log4cxx/logger.h"
      #include "/home/whoever/logging-log4cxx/include/log4cxx/logger.h"

      and compile them with the -Wall and -Weffc++ options.

      The current implementation of -Weffc++ will report errors for most STL implementations. To suppress these errors, non-functional "mock" declarations for some STL include files were added in the mock directory.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            carnold@apache.org Curt Arnold
            carnold@apache.org Curt Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment