Skip to content

Improve tests and docs#14

Merged
tamada merged 28 commits into
mainfrom
improve-tests-and-docs
Jun 8, 2026
Merged

Improve tests and docs#14
tamada merged 28 commits into
mainfrom
improve-tests-and-docs

Conversation

@tamada

@tamada tamada commented May 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

tamada added 21 commits April 21, 2026 07:43
- 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.
@tamada tamada added this to the v1.0.0 milestone May 29, 2026
@tamada tamada requested a review from Copilot May 29, 2026 02:31
@tamada tamada self-assigned this May 29, 2026
@tamada tamada added documentation Improvements or additions to documentation enhancement New feature or request labels May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md Outdated
Comment thread lcov.info Outdated
@@ -0,0 +1,784 @@
SF:/Users/tamada/products/lis/cli/args.rs

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not suitable for versioning.

Comment thread src/entry.rs
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()),
Comment thread cli/display.rs Outdated
for c in 0..cols {
let i = c * rows + r;
if i < names.len() {
print!("{:<width$}", names[i], width = max_width);
@tamada

tamada commented May 29, 2026

Copy link
Copy Markdown
Owner Author

🚀 Documentation and Testing Enhancements

I have completed the task of enhancing the project's documentation and testing coverage.

Key Improvements:

  • Comprehensive Documentation: Added module-level and function-level doc comments with practical examples for all public components.
  • LisBuilder Pattern: Introduced a LisBuilder for flexible configuration, updating all CLI and example code to follow this pattern.
  • Expanded Test Suite:
    • Achieved 89.12% line coverage using llvm-cov.
    • Implemented isolated integration tests using tempfile.
    • Added unit tests for Git status logic and CLI display components.
    • Verified and enabled all Doc-tests (15 tests).
  • Clippy Compliance: Resolved all linting warnings, including implementing Default for LisBuilder.

All tests are passing, and the codebase now adheres to Rust's idiomatic practices.

@coveralls

coveralls commented May 29, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27118967999

Coverage increased (+84.7%) to 84.722%

Details

  • Coverage increased (+84.7%) from the base build.
  • Patch coverage: 88 uncovered changes across 6 files (488 of 576 lines covered, 84.72%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
cli/main.rs 33 0 0.0%
cli/gencomp.rs 30 0 0.0%
cli/display.rs 237 215 90.72%
src/entry.rs 120 119 99.17%
src/git.rs 43 42 97.67%
src/lib.rs 89 88 98.88%
Total (7 files) 576 488 84.72%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 576
Covered Lines: 488
Line Coverage: 84.72%
Coverage Strength: 9.81 hits per line

💛 - Coveralls

Copilot finished work on behalf of tamada May 29, 2026 04:11
@tamada tamada merged commit c38311f into main Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants