Improve tests and docs#14
Merged
Merged
Conversation
…fic imports in entry.rs
- Add doc comments with examples to public library components. - Enable and verify doc-tests. - Add unit tests for Git status logic in src/git.rs. - Expand integration tests for more CLI scenarios. - Update README.md with features, examples, and library usage.
There was a problem hiding this comment.
Pull request overview
This PR expands lis from a minimal placeholder into a documented Rust library plus CLI for directory listing, with tests, examples, Git integration, formatting support, and CI updates.
Changes:
- Adds library modules for directory entries, traversal, sorting, and Git status collection.
- Adds CLI argument parsing/output rendering, docs, examples, and integration/unit tests.
- Updates workflows and adds generated coverage output.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Adds runtime/test dependencies and configures the lis binary at cli/main.rs. |
src/main.rs |
Removes the old hello-world binary entry point. |
src/lib.rs |
Adds the core Lis/LisBuilder listing API and traversal behavior. |
src/entry.rs |
Adds entry metadata representation and sorting helpers. |
src/git.rs |
Adds Git status lookup integration. |
cli/args.rs |
Adds CLI options and parsing tests. |
cli/display.rs |
Adds plain/column/long display rendering and icon support. |
cli/main.rs |
Wires CLI parsing, listing, sorting, and output formats. |
tests/integration_test.rs |
Adds integration coverage for listing, recursion, hidden files, sorting, symlinks, gitignore, and Git status. |
examples/basic.rs |
Adds a simple library usage example. |
examples/complex.rs |
Adds a recursive/sorted usage example. |
README.md |
Expands project description, usage, features, library docs, and license section. |
cli/README.md |
Adds CLI-specific usage documentation. |
lcov.info |
Adds generated coverage data. |
.github/workflows/build.yaml |
Updates CI matrix and coverage generation behavior. |
.github/workflows/publish.yaml |
Adds explanatory comments and removes stale commented blocks. |
.github/workflows/update-version.yaml |
Updates checkout action version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,784 @@ | |||
| SF:/Users/tamada/products/lis/cli/args.rs | |||
Owner
Author
There was a problem hiding this comment.
This file is not suitable for versioning.
Comment on lines
+97
to
+100
| mode: get_mode_string(metadata.permissions().mode(), is_dir, is_symlink), | ||
| nlink: metadata.nlink(), | ||
| owner: get_owner_name(metadata.uid()), | ||
| group: get_group_name(metadata.gid()), |
| for c in 0..cols { | ||
| let i = c * rows + r; | ||
| if i < names.len() { | ||
| print!("{:<width$}", names[i], width = max_width); |
Owner
Author
🚀 Documentation and Testing EnhancementsI have completed the task of enhancing the project's documentation and testing coverage. Key Improvements:
All tests are passing, and the codebase now adheres to Rust's idiomatic practices. |
Coverage Report for CI Build 27118967999Coverage increased (+84.7%) to 84.722%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.