diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 9d7de4803..f7095f02b 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -31,7 +31,7 @@ jobs: matrix: spec: ["objc_spec", "swift_spec", "cocoapods_spec"] env: - DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer steps: - uses: actions/checkout@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 26c346d8e..5a83ea91f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ ##### Enhancements -* None. +* Correct line number references with Xcode 13. + [John Fairhurst](https://github.com/johnfairh) ##### Bug Fixes diff --git a/lib/jazzy/doc_builder.rb b/lib/jazzy/doc_builder.rb index ab43513d8..5ca4d12f6 100644 --- a/lib/jazzy/doc_builder.rb +++ b/lib/jazzy/doc_builder.rb @@ -183,7 +183,7 @@ def self.undocumented_warnings(decls) decls.map do |decl| { file: decl.file, - line: decl.line || decl.start_line, + line: decl.start_line || decl.line, symbol: decl.fully_qualified_name, symbol_kind: decl.type.kind, warning: 'undocumented', diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 0ba6d372e..0d3a95e74 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -188,9 +188,10 @@ def configure_cocoapods describe 'Creates docs with a module name, author name, project URL, ' \ 'xcodebuild options, and github info' do behaves_like cli_spec 'document_alamofire', - '--skip-undocumented', - # Ignore existing docs output - '--clean' + '--skip-undocumented ' \ + '--clean ' \ + '--xcodebuild-arguments ' \ + "-destination,'platform=OS X'" end describe 'Creates Realm Swift docs' do @@ -210,7 +211,8 @@ def configure_cocoapods '--root-url https://realm.io/docs/swift/' \ "#{realm_version}/api/ " \ '--xcodebuild-arguments ' \ - '-scheme,RealmSwift,SWIFT_VERSION=4.2 ' \ + '-scheme,RealmSwift,SWIFT_VERSION=4.2,' \ + "-destination,'platform=OS X' " \ "--head #{realm_head.shellescape}" end diff --git a/spec/integration_specs b/spec/integration_specs index 40f5c2e43..10337f7d7 160000 --- a/spec/integration_specs +++ b/spec/integration_specs @@ -1 +1 @@ -Subproject commit 40f5c2e430ddc39429b2080e1491eac4f4104ce5 +Subproject commit 10337f7d7fa21e7eac0d368840859a0332f0d853