Closed sebsto closed 10 months ago
This is blocking https://github.com/swift-server/swift-aws-lambda-runtime/pull/300
According to this message, docc
does not allow to remove or hide comments or snippets before generating the HTML.
Unfortunately this isn’t possible today. I think it would make sense to add support for hiding regions of code from tutorial code files (likely inspired by what is used for Snippets) but I wouldn’t want to block your work on this. I’d suggest you file a feature request on the Swift-DocC repo asking for this support, and then just link to it in your swift-aws-lambda PR where you skip the .docc directory. Alternatively, you could add some kind of transformation step that strips the comments before invoking docc, but I could see that getting messy.
Based on this, I will propose a PR to change the behavior of scripts/soundness.sh
Will be fixed by https://github.com/swift-server/swift-aws-lambda-runtime/pull/307
closing now that https://github.com/swift-server/swift-aws-lambda-runtime/pull/307 is merged
Expected behavior
Source code files that are part of the documentation should not have the required license header, that would make tutorial and documentation harder to read.
Actual behavior
CI script
scripts/soundness.sh
checks for license headers in ALL source files.There are two possibles solutions :
(preferred) add the required license header files to all source code snippet in the doc and tell DocC to ignore the header file when generating the HTML page. (I asked the question to on the DocC slack channel and wait for a response)
modify
scripts/soundness.sh
to excludeDocumentation.docc
folders for the license header check.Steps to reproduce
.swift
file in the documentationdocker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.58.yaml run soundness
Result :
If possible, minimal yet complete reproducer code (or URL to code)
https://github.com/sebsto/swift-aws-lambda-runtime/tree/sebsto/getting-started-doc
What version of this project (
swift-aws-lambda-runtime
) are you using?1.0.0-alpha-0.1
Swift version
n/a
Amazon Linux 2 docker image version
n/a