Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14300

Documentation comment being parsed incorrectly.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Invalid
    • Component/s: SourceKit-LSP, SwiftSyntax
    • Labels:
      None
    • Environment:

      macOS: 11.2.1

      xcode: 12.4(12D4e)

      swift: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)

      Description

      If you write a document like: 
      
      /** 
      ./folder/*
      */ 
      
      Xcode will throw an error:Unterminated '/*' comment
      class Test {
          /**
           Run lizard code cyclomatic complexity analysis.
      
      
           - parameters:
             - exclude: Exclude files that match this pattern. * matches everything, ? matches any single character, "./folder/*" exclude everything in the folder recursively. Multiple patterns can be specified. Don't forget to add "" around the pattern
           It counts 1)the nloc (lines of code without comments), 2)CCN (cyclomatic complexity number), 3)token count of functions. 4)parameter count of functions.
          */
          public func lizard(sourceFolder: String? = nil,
                             language: String = "swift",
                             exportType: String? = nil,
                             ccn: Any? = nil,
                             length: Any? = nil,
                             executable: String? = nil) {
          }
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ccdoky phil zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: