Releases: doraemonkeys/sloc-guard
Releases · doraemonkeys/sloc-guard
v0.3.3
What's Changed
Commits
- chore: bump version to 0.3.3 (b0fb84e)
- feat: add Svelte language support, improve presets, and add Supported Languages section to README (7f854df)
- feat: add Move language support with move-strict preset (01298d9)
- refactor: extract repo URL into shared REPO_URL constant (e72b31c)
- fix: replace unwrap with if-let binding to satisfy clippy (e4e4c19)
Installation
Download the appropriate binary for your platform from the assets below.
| Platform | Architecture | File |
|---|---|---|
| Windows | x64 | sloc-guard-v0.3.3-windows-x64.zip |
| Windows | arm64 | sloc-guard-v0.3.3-windows-arm64.zip |
| Linux | x64 | sloc-guard-v0.3.3-linux-x64.tar.gz |
| Linux | arm64 | sloc-guard-v0.3.3-linux-arm64.tar.gz |
| macOS | x64 | sloc-guard-v0.3.3-macos-x64.tar.gz |
| macOS | arm64 | sloc-guard-v0.3.3-macos-arm64.tar.gz |
Full Changelog: v0.3.2...v0.3.3
v0.3.2
What's Changed
Commits
- chore: bump version to 0.3.2 (b4ca2a0)
- Add support for Go strict preset: Implement rules for test files, structure, and exclusions. Update existing presets to include Go language support and enhance test file handling across multiple languages in monorepo base preset. (1799344)
- Organize integration tests into domain-focused submodules:
check_core_tests,check_output_tests,check_rules_tests, andcheck_state_tests. (8cc0285) - Update rules.mdc: Add "Principle of Least Surprise" and "Separate Tests from Code" principles to enhance design guidelines. Refine existing principles for clarity and focus on clean design and testability. (7edfc18)
- Refactor path normalization: Introduce
normalize_for_matchingfunction for consistent path handling across platforms. UpdateThresholdCheckerandAllowlistRuleto utilize the new normalization method, ensuring accurate glob pattern matching. Remove redundant normalization logic fromallowlist.rsand add comprehensive tests for path normalization scenarios. (ba2e9b5)
Installation
Download the appropriate binary for your platform from the assets below.
| Platform | Architecture | File |
|---|---|---|
| Windows | x64 | sloc-guard-v0.3.2-windows-x64.zip |
| Windows | arm64 | sloc-guard-v0.3.2-windows-arm64.zip |
| Linux | x64 | sloc-guard-v0.3.2-linux-x64.tar.gz |
| Linux | arm64 | sloc-guard-v0.3.2-linux-arm64.tar.gz |
| macOS | x64 | sloc-guard-v0.3.2-macos-x64.tar.gz |
| macOS | arm64 | sloc-guard-v0.3.2-macos-arm64.tar.gz |
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
Commits
- chore: release v0.3.1 (6798d55)
- Update PROJECT_OVERVIEW.md: Clarify project root and state path resolution details, including changes to state directory detection and baseline path defaults for improved documentation accuracy. (2c89952)
- Update README.md: Clarify instructions for downloading the pre-built binary by adding a note to include adding it to the system PATH. (05cc5ce)
- Enhance quiet mode functionality: Update documentation for the
quietflag in CLI to clarify its behavior regarding output suppression. Implementis_issuemethod inCheckResultto determine actionable issues for quiet mode. Add comprehensive tests for quiet mode output behavior, ensuring correct handling of success, failure, and warning scenarios. Refactor output writing logic to ensure file writes proceed regardless of quiet mode, while stdout output is suppressed appropriately. (6d4347d)
Installation
Download the appropriate binary for your platform from the assets below.
| Platform | Architecture | File |
|---|---|---|
| Windows | x64 | sloc-guard-v0.3.1-windows-x64.zip |
| Windows | arm64 | sloc-guard-v0.3.1-windows-arm64.zip |
| Linux | x64 | sloc-guard-v0.3.1-linux-x64.tar.gz |
| Linux | arm64 | sloc-guard-v0.3.1-linux-arm64.tar.gz |
| macOS | x64 | sloc-guard-v0.3.1-macos-x64.tar.gz |
| macOS | arm64 | sloc-guard-v0.3.1-macos-arm64.tar.gz |
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
Commits
- chore: bump version to 0.3.0 (eb49376)
- Update README.md: Add note clarifying the behavior of the
--diffoption in sloc-guard, specifying that it only compares committed trees and does not check unstaged changes. (5f3ec13) - Enhance stats trend command: Modify the trend display to show only summary and trend delta, excluding the file list. Add regression tests to ensure correct behavior in both JSON output and standard output formats, verifying that the command runs successfully without displaying individual file details. (dbff0a3)
- Refactor configuration validation: Move semantic validation logic to a dedicated module, enhancing organization and maintainability. Implement two-phase validation during config loading to ensure syntax and semantic correctness. Update tests to cover new validation scenarios and improve error handling for configuration issues. (8df0c0b)
- Enhance configuration loading and error handling: Introduce
parse_config_with_reset_handlingto manage TOML parsing based on reset markers, improving line number preservation for errors. Add tests for new functionality and ensure accurate detection of reset markers in various scenarios. (81b1a0c) - Update Implementation Plan: Refine sections on Dual-Path Loading Strategy and Config Source Chain, adding clarity on parsing modes and configuration inheritance display. Remove optional Loader Single Responsibility Split section to streamline focus on core features. (1675312)
- Split ./src/config/loader.rs (b08438d)
- Refactor error tests: Modularize error tests by splitting them into dedicated files for configuration sources, extends handling, Git errors, IO errors, pattern matching, semantic errors, and syntax errors. This improves organization and maintainability of the test suite, ensuring comprehensive coverage of error handling scenarios. (9a109bf)
- Refactor and reorganize explain tests: Move existing tests from
explain_tests.rsto modular test files for better organization. Introduce new test files for content matching, structure matching, configuration sources, formatting, and run explain integration tests. This enhances maintainability and clarity of the test suite. (4c92674) - Implement
explain --sourcesfeature for configuration inheritance tracking: Enhance the CLI to support a new--sourcesflag in theexplaincommand, allowing users to view the configuration inheritance chain and the source of each setting. Update theConfigExplanationstruct to include source tracking, and refactor the config loader to return detailed source information. Add comprehensive tests to validate the functionality and ensure accurate reporting of configuration origins. (f038a9c) - Enhance TOML syntax error handling and reporting: Introduce precise location tracking for syntax errors in TOML files, including line and column numbers. Update SlocGuardError to include a Syntax variant with origin information. Refactor config loader to utilize this new error handling, ensuring accurate reporting for both single-file and inheritance modes. Add comprehensive tests to validate syntax error detection and reporting across various scenarios. (51f1cda)
- Update MAX_EXTENDS_DEPTH documentation and enhance test clarity: Clarify the behavior of the maximum extends depth in the loader configuration and improve comments in the depth limit tests to accurately reflect the logic of the extends chain. (8c361dc)
- Split ./src/config/loader_tests/extends_tests.rs (2aea891)
- Add ConfigSource and structured error handling: Introduce ConfigSource enum for tracking configuration origins and enhance SlocGuardError with detailed error types for circular extends, depth limits, type mismatches, and semantic errors. Update loader to utilize IndexSet for visited paths, ensuring accurate error reporting. Add comprehensive tests for new error handling features. (85b251e)
- Refactor config loader to implement extends chain depth limit: Introduce a maximum depth for nested config extends to prevent stack overflow. Update loading functions to enforce this limit and enhance error messaging. Add comprehensive tests to validate depth limit behavior and ensure informative error reporting. (397cfd4)
- Refactor config validation: Split
validate_config_semanticsinto dedicated functions for content, glob patterns, stats, and structure validation. This improves code organization and readability. Add comprehensive tests for content, stats, and structure validation to ensure correct behavior across various scenarios. (1c37b8a) - Refactor project root resolution: Update the
resolve_project_rootfunction to always discover the project root by traversing the directory tree, ensuring consistent state file locations. Adjust related tests to reflect this change and improve clarity in project root discovery. (5825054) - Add tests for structure checker boundary conditions: Introduce tests to ensure that the warning threshold does not trigger violations at the exact boundary for depth, file count, and directory count. This enhances the accuracy of violation detection in the StructureChecker. (3109f25)
- Optimize StructureChecker file processing: Refactor file rule matching to group files by parent directory, reducing complexity from O(Files * Rules) to O(Dirs * Rules). Enhance violation detection for both directed and group rules, ensuring accurate identification of missing siblings and incomplete groups. (cc0b8cb)
- Add acquire_warning_lock to remote tests: Integrate warning lock acquisition in fetch, hash verification, and policy tests to ensure consistent handling of warnings during test execution. (ea8434d)
- Refactor command structure in PROJECT_OVERVIEW.md (7247d47)
- Enhance StructureChecker to handle empty stems: Update the logic to reject both overlapping ranges and empty stems in file name checks. Add comprehensive tests to verify behavior for files with empty stems, ensuring correct matching and violation detection for directed and group rules. (0a9c04f)
- Refactor warning threshold handling in StructureChecker: Move the default warning threshold constant to the top of the file for better visibility and reuse. Update the check method to utilize this constant instead of a hardcoded value, enhancing maintainability. (5063da1)
- Document Phase 24 (35dff28)
- Enhance test coverage for content explanation: Update existing tests to reflect changes in output formatting for global and rule-based sources. Introduce new tests for absolute and percentage sources with index, ensuring accurate representation of warning thresholds in explanations. (ef163f1)
- Add comprehensive tests for the expires module: Introduce a new test suite in
expires_tests.rsto validate date parsing, expiration logic, and rule collection. This includes tests for valid and invalid date formats, comparisons, and various scenarios for expired rules in both content and structure configurations, ensuring robust coverage of expiration functionality. (0abf7e7) - Add scope boundaries documentation: Introduce a new document outlining the features and functionalities that sloc-guard will not implement, emphasizing the tool's focus on simplicity and maintainability. This includes clear guidelines on the boundaries for rule complexity, code quality metrics, auto-fix capabilities, IDE integration, and more, to ensure predictable behavior and auditable output for users. (ea1e8f0)
- Add sloc-guard-dev job to CI workflow: Implement a debug build step for sloc-guard to enhance self-check capabilities. This includes building the tool and running checks against pull request diffs, improving the CI process for development builds. (3ff7748)
- Update documentation: Revise README to enhance clarity on CI integration and add a new section for configuration examples in the newly created RECIPES.md file. Streamline advanced usage instructions and improve the organization of content related to monorepo setups and various project types. (c6e8a10)
- Update README and project overview: Add new configuration options for check behavior, including
warnings_as_errorsandfail_fast. Clarify CLI command descriptions and enhance documentation for array merging functionality in configuration. Improve overall clarity and usability of the documentation. (bf6a0b2) - Refactor CLI configuration handling: Introduce
ExtendsPolicyenum to manage remote config fetch strategies, replacing theofflineflag with a unified approach. Update related CLI arguments, tests, and documentation to reflect changes in cache management and command behavior, ensuring improved clarity and functionality. (d440ac7) - Refactor remote configuration tests: Consolidate and organize test cases into dedicated modules for cache operations, fetching behavior, hash verification, and URL handling. Update paths and ensure comprehensive coverage of functionality, enhancing maintainability and clarity in the testing structure. (d556313)
- Enhance check command configuration: Introduce
CheckConfigstruct to manage warning and failure behaviors, includingwarnings_as_errorsandfail_fastoptions. Update CLI argument handling and related tests to reflect these changes, ensuring improved feedback and error management during checks. (e5912b1) - Enhance configuration handling: Introduce
FetchPolicyenum for cache strategies, unify cache flags, and update remote config fetching logic. Refactor related tests and documentation to reflect changes in cache management and behavior. (2eaeaa0) - Refactor Implementation Plan (a6b4cac)
- Enhance array merge functionality: Implement
$resetmarker support to clear parent arrays during merges, validate marker positions, and strip markers from standalone configs. Update related tests to ensure correct behavior and integration with existing configuration handling. (1b45528) - Add config design improvements: Introduce array merge with
$resetmarker, separate offline cache ...
v0.2.3
What's Changed
Commits
- Update SLOC Guard version to 0.2.3 in Cargo.toml and Cargo.lock for improved functionality and compatibility. (e20d8f5)
- Fix documentation in action contract tests: Update JSON output format description for clarity and consistency. (4d5197a)
- Update action configuration and README for SLOC Guard: Replace reporting flags with --write-json and --write-sarif for improved output handling. Clarify documentation on multi-format output to enhance CI performance. (63a1e36)
- Update README and action configuration for SLOC Guard: Simplify GitHub Actions section, enhance command options for SARIF and JSON reporting, and ensure proper permissions for action execution. This improves clarity and functionality in CI workflows. (6c961ef)
- Remove unnecessary blank line in action contract tests file to improve code cleanliness. (a05fca9)
- Update GitHub Action for SLOC Guard: Change fail-on-warning behavior to use --strict option, enhancing error handling. Update CI workflow to dynamically set the diff input based on the pull request base reference. Add comprehensive contract tests for action functionality, ensuring CLI options and JSON output schema are validated. (b2689b4)
- Enhance GitHub Action for SLOC Guard: Improve platform detection and version resolution logic, ensuring accurate caching and handling of the latest version. Update problem matcher regex patterns to include depth and reason for errors and warnings. Refine command construction for better shell safety and quoting. Update README to clarify input path handling. (a0f5cff)
- Enhance GitHub Action for SLOC Guard: Implement single-run multi-format output for SARIF and JSON, improving CI efficiency. Update action logic to capture exit codes consistently and ensure proper handling of output files. Add tests for new output features and adjust documentation accordingly. (98db714)
- Refactor GitHub Action for SLOC Guard: Enhance platform and architecture detection, align binary download format with release naming conventions, and improve SARIF output structure. Update caching and version handling for better reliability and consistency. (8df80d5)
- Refactor GitHub Actions workflow: Update SLOC Guard installation method to use GitHub CLI for downloading releases, improve reliability of SARIF output, and enhance action efficiency by addressing caching and shell quoting issues. (2a2866f)
- Update README (de3e8cf)
Installation
Download the appropriate binary for your platform from the assets below.
| Platform | Architecture | File |
|---|---|---|
| Windows | x64 | sloc-guard-v0.2.3-windows-x64.zip |
| Windows | arm64 | sloc-guard-v0.2.3-windows-arm64.zip |
| Linux | x64 | sloc-guard-v0.2.3-linux-x64.tar.gz |
| Linux | arm64 | sloc-guard-v0.2.3-linux-arm64.tar.gz |
| macOS | x64 | sloc-guard-v0.2.3-macos-x64.tar.gz |
| macOS | arm64 | sloc-guard-v0.2.3-macos-arm64.tar.gz |
Full Changelog: v0.2.2...v0.2.3
v0.2.2
What's Changed
Commits
- chore: bump version to 0.2.2 (c542844)
Installation
Download the appropriate binary for your platform from the assets below.
| Platform | Architecture | File |
|---|---|---|
| Windows | x64 | sloc-guard-v0.2.2-windows-x64.zip |
| Windows | arm64 | sloc-guard-v0.2.2-windows-arm64.zip |
| Linux | x64 | sloc-guard-v0.2.2-linux-x64.tar.gz |
| Linux | arm64 | sloc-guard-v0.2.2-linux-arm64.tar.gz |
| macOS | x64 | sloc-guard-v0.2.2-macos-x64.tar.gz |
| macOS | arm64 | sloc-guard-v0.2.2-macos-arm64.tar.gz |
Full Changelog: v0.2.1...v0.2.2