Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

super minor tweak to README & warning emit in generate #92

Merged
merged 6 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed README to clarify use of `swift-doc` vs. `swift doc`
on the command line.
#89 by @mattt.
- Changed the `generate` command to emit a warning if no source
files are found.
#92 by @heckj

### Fixed

Expand All @@ -30,6 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#62 by @victor-pavlychko.
- Fixed rendering of protocol requirements in the HTML version.
#76 by @victor-pavlychko.
- Fixed default location of sources reference in README
#92 by @heckj

## [1.0.0-beta.2] - 2020-04-08

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:
- name: Generate Documentation
uses: SwiftDocOrg/swift-doc@master
with:
inputs: "Source"
inputs: "Sources"
module-name: MyLibrary
output: "Documentation"
- name: Upload Documentation to Wiki
Expand Down
5 changes: 4 additions & 1 deletion Sources/swift-doc/Subcommands/Generate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ extension SwiftDoc {
pages[path(for: name)] = GlobalPage(module: module, name: name, symbols: symbols)
}

guard !pages.isEmpty else { return }
guard !pages.isEmpty else {
logger.warning("No public API symbols were found at the specified path. No output was written.")
return
}

if pages.count == 1, let page = pages.first?.value {
let filename: String
Expand Down