Details

    • Number of attachments :
      0

      Description

      We should allow defines which only have literals (basically constant declarations)
      And create a property with the list of those macro names we want to ignore.
      like: DEBUG, WARN, ERROR, WHATEVER

        Activity

        Hide
        Tamas Kende added a comment -

        There are 3 parameters for this check:

        • skipDefineInFlowControl - to ignore everything in -ifdef, -ifndef, -else (default value is true)
        • allowLiteralMacros - to allow literal macros like: -define(TIMEOUT, 100). (default value is true), at the moment it checks if the first argument like a function declaration: X([..])
        • ignoredMacroNames - to make it possible to provide a list of macro names what should be ignored, regardless of the previous settings. It is a comma separated list, and by default it is empty.

        The hierarchy of the settings are: skipDefineInFlowControl --> allowLiteralMacros --> ignoredMacroNames

        Show
        Tamas Kende added a comment - There are 3 parameters for this check: skipDefineInFlowControl - to ignore everything in -ifdef, -ifndef, -else (default value is true) allowLiteralMacros - to allow literal macros like: -define(TIMEOUT, 100). (default value is true), at the moment it checks if the first argument like a function declaration: X( [..] ) ignoredMacroNames - to make it possible to provide a list of macro names what should be ignored, regardless of the previous settings. It is a comma separated list, and by default it is empty. The hierarchy of the settings are: skipDefineInFlowControl --> allowLiteralMacros --> ignoredMacroNames
        Hide
        Evgeny Mandrikov added a comment -

        LGTM.

        Show
        Evgeny Mandrikov added a comment - LGTM.

          People

          • Assignee:
            Tamas Kende
            Reporter:
            Tamas Kende
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: