Xcode: "Add documentation" includes comments instead of the parameters
Originator: | thomas.mellenthin | ||
Number: | rdar://31987199 | Date Originated: | 04-may-2017 |
Status: | open | Resolved: | |
Product: | Xcode | Product Version: | 8.3.2 |
Classification: | other | Reproducible: | always |
// "Add documentation" includes comments instead of the parameters // // Steps to reproduce: // =================== // // * navigate the cursor to the first line of the fooBar method declaration // * press the "Add documentation" shortcut ⌥ ⌘ * // // Expected Result: // ================ // /// <#Description#> /// /// - Parameters: /// - first: <#first description#> /// - second: <#second description#> /// - third: <#third description#> // // Actual result: // ============== // /// <#Description#> /// /// - Parameters: /// - first: <#first description#> /// - swiftlint: <#swiftlint description#> /// - this: <#this description#> // // Parameters swiftlint and this do not exist, parameter documentation for second and third is missing // Press "Add documentation" shortcut: ⌥ ⌘ * on the next line func fooBar(first: String, // swiftlint:disable:this cyclomatic_complexity // it's complicated second: String, // this: parameter is ignored third: String) { // cool: this comment is not included // do something very complicated }
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Problem still reproducible in Xcode 9.0 b3 (9M174d).
"Add documentation" still gets confused by inline C++ comments
bug still present in Xcode 9 beta 2 (9M137d)
The Problem is still reproducible in Xcode 9 beta 1 (9M136h).