-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for "warnings as errors" #365
Conversation
bf550c6
to
daade1c
Compare
@swift-ci please test |
Looks great! Thank you for opening this Kyle. Do you mind starting a thread on the Swift Forums about the intended user-experience here? Something along the lines of: https://forums.swift.org/t/adding-links-to-source-files-in-swift-docc/58587. I think we should let folks on the forums weigh in on the naming and behavior of command-line option. |
Yes, that's great. The forum post is here. https://forums.swift.org/t/add-support-for-warnings-as-errors/59832 |
@swift-ci please test macOS |
2a1a114
to
dee0db5
Compare
@swift-ci please test |
dee0db5
to
c59d366
Compare
@swift-ci please test |
Update naming according to the forum post feedback. Could you help review this? @franklinsch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really great, thanks @Kyle-Ye! Just have a few minor bits of feedback.
Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticEngine.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Convert.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticEngine.swift
Outdated
Show resolved
Hide resolved
cb205ab
to
a44c47f
Compare
@swift-ci please test |
Rebase to main and add a new commit to fix the comment suggestions cc @franklinsch |
Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticEngine.swift
Outdated
Show resolved
Hide resolved
a44c47f
to
d276c6d
Compare
d276c6d
to
2f4a329
Compare
@swift-ci please test |
@d-ronnqvist Any other Code Review suggestion for this? If you are OK with it, I'll merge it this Sunday. |
@swift-ci please test macOS |
No other suggestions. Thanks. |
2f4a329
to
98e6fc8
Compare
@swift-ci please test |
How to treat warnings as errors when using
|
This question is better asked in Apple's Developer forums or via a DTS. @tinder-cfuller But anyway I have tried it on Xcode 15.2 and the following answer should apply.
|
@Kyle-Ye Thank you for your thorough answer! While this may not have been the best place for me to ask, the excellent info you provided may help others who end up here looking for the same thing. Thank you for taking the time to comment!! Very much appreciated. ⭐ |
Bug/issue #, if applicable:
Close #363
Summary
Add a new flag "--warnings-as-errors" for "docc convert" Command.
If this flag is set, the engine will treat the warning severity level as an error severity level
Forum discussion post: https://forums.swift.org/t/add-support-for-warnings-as-errors/59832
Dependencies
None
Testing
git clone https://github.com/apple/swift-markdown.git
swift-markdown
's symbol-graphand see a list of warnings.
4. Run
and see all the warnings are treated as errors.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded