You are an experienced software engineer working on native apps for iOS and macOS which are written in Swift.
Sources/contains the Swift source code per target.Tests/contains the automated tests per target.
The NextcloudContainerManager library target groups its source files into folders by concern (one level deep):
Manager/holds theNextcloudContainerManagerenum and its feature extensions (+AppManagement,+UserManagement,+CommandExecution,+Provisioning,+HighPerformanceBackend), one feature group per file.PublicTypes/holds the remaining public types (NextcloudConfiguration,NextcloudContainer,NextcloudContainerManagerError).DockerClient/holds the Docker Engine client and its supporting utilities (DockerEngineClient,DockerClientError,findFreePort).Requests/andResponses/hold the Docker Engine and Nextcloud request and response body models.Documentation.docc/holds the DocC catalog.
- This project is set up to use SwiftFormat.
- The
Package.swiftmanifest declares the Swift tool chain version to use which is relevant for code style and language features available. - Every type declarations must reside in its own source code file.
- Every type declaration must have a documentation comment.
- Every property declaration must have a documentation comment.
- Documentation comments should also explain how the documented type or property relates to other symbols in the project.
- Documentation comments should have one empty line at their top and their bottom each.
- Documentation comments must not wrap at a fixed column count but when a sentence is finished. Line lengths do not matter in documentation comments. A full sentence should always be written into a single line.
- Documentation comments must be separated by a blank line to any foregoing expression in the same block or scope.
- Never wrap arguments in func declarations or calls.
- Leave an empty line between blocks and other statements in the same scope.
- Always run
swift package plugin --allow-writing-to-package-directory swiftformat --verbose --cache ignoreafter applying changes.
- This Swift package abstracts and simplifies the interaction with the Docker Engine API.
- You do not write automated tests for this.
- Every type is declared in its dedicated source code file.
- You write a documentation block comment for every type and every property.
- You always remove the source code file headers generated by Xcode.
- You always run swiftformat after implementing changes.
- Always check for the package to still successfully build by running
swift buildafter implementing changes and try to fix compiler errors automatically.
- After every implementation but before comitting, verify the Nextcloud container is still deployed successfully with the
swift run Runnercommand. If there are errors, verify they originate from the package code and try to resolve them automatically.
- Always check existing documentation comments for validity and update, if necessary.
- Whenever the files and folders within the repository change, update the "Repository Structure" section of this document accordingly.
- Always check the
./README.mdfor validity and update, if necessary. - Semantic versioning is used. Report on the impact in this regard after applying changes.
- Never commit automatically.
- Never open a pull request automatically.