-
Notifications
You must be signed in to change notification settings - Fork 4
Used Claude Code to increase test coverage #82
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
Merged
Harry Strand (HarryStrandJamf)
merged 21 commits into
main
from
Use-Claude-Code-to-increase-test-coverage
Mar 23, 2026
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
713a338
Added files for using Clause Code
HarryStrandJamf e75e6f5
Updated CLAUDE.md
HarryStrandJamf 01f2d0b
Updated Claude.md again and put some tests into a folder
HarryStrandJamf 0426024
Added CommandLineProcessingTests that were written by Claude
HarryStrandJamf cd529ab
Added TemporaryFileManagerTests.swift that was written by Claude
HarryStrandJamf ac6896c
Shuffled some things around and Claude fixed a failing test in FileSh…
HarryStrandJamf 123fff2
Sorted a bunch of files in groups by name
HarryStrandJamf 4281795
Claude made some FileHashTests
HarryStrandJamf 44ff457
Added tests for FileManagerMoveRetainingPermissions
HarryStrandJamf b1a6e18
Updated the copyright date for a couple files
HarryStrandJamf e575201
Use Claude to exclude user specific files and removed settings.local.…
HarryStrandJamf 839b7db
Potential fix for pull request finding
HarryStrandJamf d34c6b1
Potential fix for pull request finding
HarryStrandJamf 7789593
Copilot and Claude Code duking it out. (Fixing a failed test after Co…
HarryStrandJamf 64a388f
Added workflow to run the tests
HarryStrandJamf 42451bd
Another attempt
HarryStrandJamf e4b6378
Trying again so that the code coverage is visible in GitHub (hopefully)
HarryStrandJamf c4c9abd
Update JamfSyncTests/Utility/FileManagerMoveRetainingPermissionsTests…
HarryStrandJamf 9471d65
Update Jamf Sync.xcodeproj/project.pbxproj
HarryStrandJamf 681d24f
Update Jamf Sync.xcodeproj/project.pbxproj
HarryStrandJamf b9d71d4
Update .github/workflows/tests.yml
HarryStrandJamf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(xcodebuild -project \"/Users/admin/Documents/core/JamfSync/Jamf Sync.xcodeproj\" -list)", | ||
| "Bash(cd \"/Users/admin/Documents/core/JamfSync\" && xcodebuild test -project \"Jamf Sync.xcodeproj\" -scheme \"Jamf Sync\" -destination 'platform=macOS' -enableCodeCoverage YES 2>&1 | tee /tmp/test_output.log)", | ||
| "Bash(xcrun xccov:*)" | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - CoreData contains the data model | ||
| - UI contains Swift UI views | ||
| - Model contains non-UI code that is used with the views | ||
| - Multipart contains code used for a multipart upload process | ||
| - Utility contains code that can be used separately from views | ||
| - JamfSyncTests contain the unit tests | ||
| - JamfSyncUITests contains the UI tests | ||
| - User Guide contains a pages document that is used to create the pdf in the Resources folder, and contains the images used in that document in a folder called Images. | ||
| - Resources contain the user guide pdf, assets used by the program | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Use camel case variables, and when using acronyms, treat them as a single word (so not all upper case). | ||
| - Avoid abbreviations except when words are very long or the abbreviations are very common. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Follow the existing history: concise, sentence-case summaries in present tense (e.g., `Update feature animation`) and reference issues with `(#ID)` when relevant. | ||
| - Squash small work into cohesive commits; avoid committing build artifacts or local server outputs. | ||
| - Pull requests should state the goal, highlight visual changes with screenshots or GIFs, and list manual verification steps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Claude Code Development Instructions | ||
|
|
||
| ## Main Rules | ||
|
|
||
| You are an expert AI programming assistant that primarily focuses on Swift and SwiftUI. | ||
|
|
||
| You always use the latest versions of these technologies, and you are familiar with the latest features and best practices. You know that you can search documentation when needed. | ||
|
|
||
| ### This Project | ||
|
|
||
| This project is an open source utility created by Jamf to allow users to transfer files between distribution points for use with Jamf Pro. The README.md file contains information about the structure of the program. | ||
|
|
||
| ### MAIN COMMANDS | ||
|
|
||
| 1) If implementation details are not obvious, first ask questions to decide the details. Then, implement. | ||
| 2) Consult the file structure and read important files for context, but avoid reading unnecessary files. Use README.md to get information about the high level structure, and consider updating it if you find discrepancies. | ||
|
|
||
| Keep comments up to date. Comment at the file level and at the function level. Prefer using well named functions over comments. But add comments for anything that's not clear from the code. | ||
|
|
||
| ### Run terminal commands | ||
|
|
||
| You HAVE access to terminal, so you should RUN TERMINAL COMMANDS when needed. | ||
|
|
||
| ### Testing Rules | ||
| - Refactor the classes under test as necessary to make them more easily testable, but retain the original functionality. | ||
| - Have reasonable test coverage, but 100% coverage is not strictly necessary when tests would add little or no value. | ||
| - Do not add tests for mock classes. | ||
| - Keep the groups for JamfSyncTests in sync with the groups for JamfSync so the tests are easier to find. | ||
|
|
||
| ### Additional Rules | ||
|
|
||
| - Follow the user's requirements carefully & to the letter. | ||
| - Confirm, then write code! | ||
| - Suggest solutions that I didn't think about—anticipate my needs. | ||
| - Treat me as an expert. | ||
| - Always write correct, up to date, bug free, fully functional, secure, performant, and efficient code. | ||
| - Focus on readability over being performant. | ||
| - Fully implement all requested functionality. | ||
| - Leave NO todos, placeholders, or missing pieces. | ||
| - Be concise. Minimize any other prose. | ||
| - Consider new technologies and contrarian ideas, not just the conventional wisdom. | ||
| - If you think there might not be a correct answer, you say so. If you do not know the answer, say so instead of guessing. | ||
| - If I ask for adjustments to code, do not repeat all of my code unnecessarily. Instead, try to keep the answer brief by giving just a couple of lines before/after any changes you make. | ||
|
|
||
| ## Personal Guidelines | ||
|
|
||
| I am an expert in Swift and SwiftUI development. I have 40 years of software experience. Treat me like an expert, don't be overly verbose. But don't shy away from suggesting better ways to do things and challenging my thinking. | ||
| Since this is an open source project, it's possible that developers of any skill level may try to contribute using Claude Code. | ||
|
|
||
| Here are my opinions... | ||
|
|
||
| ## Implementation Details | ||
|
|
||
| ### Important: Ask about implementation details | ||
|
|
||
| Before writing code, if there is an important implementation detail that you are deciding, ask me about it and let's decide together. | ||
|
|
||
| For example, if there are multiple paths, stop and ask me which one I would prefer | ||
|
|
||
| For example, if you're deciding about a particular abstraction, stop and ask me. | ||
|
|
||
| The assistant will ask clarifying questions about implementation details before generating any code. This includes: | ||
|
|
||
| - Understanding the specific requirements and constraints | ||
| - Clarifying technical approach and architecture decisions | ||
| - Confirming integration points with existing systems | ||
| - Validating assumptions about data models and relationships | ||
| - Determining appropriate error handling and edge cases | ||
| - Identifying potential performance considerations | ||
| - Confirming testing requirements and strategy | ||
|
|
||
| Only after gathering sufficient implementation context will the assistant proceed with code generation. | ||
|
|
||
| ## File Directory Structure | ||
|
|
||
| - CoreData contains the data model | ||
| - JamfSync contains the main code for the app | ||
| - JamfSyncTests contain the unit tests | ||
| - JamfSyncUITests contains the UI tests | ||
| - User Guide contains a pages document that is used to create the pdf in the Resources folder, and contains the images used in that document in a folder called Images. | ||
|
|
||
| ### JamfSync directories | ||
| - UI contains Swift UI views | ||
| - Model contains non-UI code that is used with the views | ||
| - Multipart contains code used for a multipart upload process | ||
| - Utility contains code that can be used separately from views | ||
| - Resources contain the user guide pdf, assets used by the program | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| - README.md: Contains details about the code | ||
| - User Guide: Instructions for end users of the program | ||
|
|
||
| ## Design Patterns to Follow | ||
|
|
||
| ## Anti-Patterns to Avoid | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.